Skip to content

Commit

Permalink
mitigate pot. heap pollution problem
Browse files Browse the repository at this point in the history
  • Loading branch information
cdietrich committed Aug 5, 2024
1 parent 87b6681 commit 597742e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion org.eclipse.xtext.web.example.jetty/src/main/webapp/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]) {
Expand Down

0 comments on commit 597742e

Please sign in to comment.