Skip to content

Commit 87443b6

Browse files
authored
Merge pull request #140 from bekzod/use-native-assign
using native `Object.assign`
2 parents bb63049 + 9b6c2e3 commit 87443b6

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/ember-app.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,21 +68,16 @@ class EmberApp {
6868

6969
// add any additional user provided variables or override the default globals in the sandbox
7070
let globals = {
71-
najax: najax,
71+
najax,
7272
FastBoot: {
7373
require: sandboxRequire,
7474
config: appConfig
7575
}
7676
};
77-
for (let key in sandboxGlobals) {
78-
if (sandboxGlobals.hasOwnProperty(key)) {
79-
globals[key] = sandboxGlobals[key];
80-
}
81-
}
8277

83-
return new sandboxClass({
84-
globals: globals
85-
});
78+
globals = Object.assign(globals, sandboxGlobals);
79+
80+
return new sandboxClass({ globals });
8681
}
8782

8883
/**

0 commit comments

Comments
 (0)