Allow extend to work with non-prototyped objects
ES6 modules do not extend the Object prototype so this blows up under the latest version of the transpiler.
This commit is contained in:
@@ -18,7 +18,7 @@ function escapeChar(chr) {
|
|||||||
|
|
||||||
export function extend(obj, value) {
|
export function extend(obj, value) {
|
||||||
for(var key in value) {
|
for(var key in value) {
|
||||||
if(value.hasOwnProperty(key)) {
|
if(Object.prototype.hasOwnProperty.call(value, key)) {
|
||||||
obj[key] = value[key];
|
obj[key] = value[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user