Open
Description
Description
the getOption method have falsy check for keyName and this may lead for some unexpected results.
link to source:
example:
const falsyKey = 0;
const view = new Mn.View({ [falsyKey]: 'some value' });
console.log(view.getOption(falsyKey)) // undefined;
console.log(view.options[falsyKey]) // somev value;
the codepen: https://codepen.io/dimatabu/pen/vYWwyMR?editors=0010
solution:
const getOption = function(optionName) {
- if (!optionName) { return; }
+ if (!arguments.length) { return; }
};
Metadata
Metadata
Assignees
Labels
No labels