diff --git a/org.eclipse.xtext.web.example.jetty/src/main/webapp/i18n.js b/org.eclipse.xtext.web.example.jetty/src/main/webapp/i18n.js index 08e7581abad..fb7a331d9d4 100644 --- a/org.eclipse.xtext.web.example.jetty/src/main/webapp/i18n.js +++ b/org.eclipse.xtext.web.example.jetty/src/main/webapp/i18n.js @@ -74,7 +74,10 @@ function mixin(target, source, force) { var prop; for (prop in source) { - if (source.hasOwnProperty(prop) && (!target.hasOwnProperty(prop) || force)) { + if (prop === '__proto__' || prop === 'constructor') { + continue; // Skip these properties + } + if (Object.prototype.hasOwnProperty.call(source, prop) && (!Object.prototype.hasOwnProperty.call(target, prop) || force)) { target[prop] = source[prop]; } else if (typeof source[prop] === 'object') { if (!target[prop] && source[prop]) {