bug fix in _createClass method

a call method 'toString' of null may arise when some value of
stringArray is null.
master
younesben 2015-02-05 06:00:52 +01:00
parent c1a884e327
commit 0e3d27c8cf
3 changed files with 13 additions and 9 deletions

10
dist/dimple.latest.js vendored
View File

@ -4160,10 +4160,12 @@
};
if (stringArray.length > 0) {
for (i = 0; i < stringArray.length; i += 1) {
/*jslint regexp: true */
returnArray.push("dimple-" + stringArray[i].toString().replace(/[^a-z0-9]/g, replacer));
/*jslint regexp: false */
}
if (stringArray[i]) {
/*jslint regexp: true */
returnArray.push("dimple-" + stringArray[i].toString().replace(/[^a-z0-9]/g, replacer));
/*jslint regexp: false */
}
}
} else {
returnArray = ["dimple-all"];
}

File diff suppressed because one or more lines are too long

View File

@ -15,10 +15,12 @@
};
if (stringArray.length > 0) {
for (i = 0; i < stringArray.length; i += 1) {
/*jslint regexp: true */
returnArray.push("dimple-" + stringArray[i].toString().replace(/[^a-z0-9]/g, replacer));
/*jslint regexp: false */
}
if (stringArray[i]) {
/*jslint regexp: true */
returnArray.push("dimple-" + stringArray[i].toString().replace(/[^a-z0-9]/g, replacer));
/*jslint regexp: false */
}
}
} else {
returnArray = ["dimple-all"];
}