Skip to content

Commit 95124af

Browse files
committed
using Object.hasOwnProperty to future proof
1 parent c38717e commit 95124af

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/ember-app.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,11 +430,14 @@ function waitForApp(instance) {
430430
* parse the specific item at the time it is needed instead of everything
431431
* all at once.
432432
*/
433+
const hasOwnProperty = Object.prototype.hasOwnProperty; // jshint ignore:line
434+
433435
function createShoebox(doc, fastbootInfo) {
434436
let shoebox = fastbootInfo.shoebox;
435437
if (!shoebox) { return; }
436438

437439
for (let key in shoebox) {
440+
if (!hasOwnProperty.call(shoebox, key)) { continue; } // TODO: remove this later #144, ember-fastboot/ember-cli-fastboot/pull/417
438441
let value = shoebox[key];
439442
let textValue = JSON.stringify(value);
440443
textValue = escapeJSONString(textValue);

0 commit comments

Comments
 (0)