In react-globalize/src/message.js
this code block (from line 43)
/* eslint-disable no-inner-declarations */
function getMessage(globalize, path) {
return globalize.cldr.get(["globalize-messages/{bundle}"].concat(path));
}
function setMessage(globalize, path, message) {
var data = {};
function set(data, path, value) {
var i;
var node = data;
var length = path.length;
for (i = 0; i < length - 1; i++) {
if (!node[path[i]]) {
node[path[i]] = {};
}
node = node[path[i]];
}
node[path[i]] = value;
}
set(data, [globalize.cldr.attributes.bundle].concat(path), message);
Globalize.loadMessages(data);
}
/* eslint-enable no-inner-declarations */
Causes PhantomJS and Firefox complaining about violation of strict mode:
SyntaxError: Functions cannot be declared in a nested block in strict mode
Function declarations should not be placed in blocks. Use a function expression or move the statement to the top of the outer function.
Verified that simply use a function expression will solve the issue
In
react-globalize/src/message.jsthis code block (from line 43)
Causes PhantomJS and Firefox complaining about violation of strict mode:
Verified that simply use a function expression will solve the issue