Skip to content

Commit f41f387

Browse files
author
Kelly Selden
authored
Merge pull request #144 from bekzod/remove-has-own
remove `.hasOwnProperty` check for shoebox keys
2 parents c60c8c8 + 95124af commit f41f387

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/ember-app.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,13 +413,14 @@ function buildBootOptions(shouldRender) {
413413
* parse the specific item at the time it is needed instead of everything
414414
* all at once.
415415
*/
416+
const hasOwnProperty = Object.prototype.hasOwnProperty; // jshint ignore:line
417+
416418
function createShoebox(doc, fastbootInfo) {
417419
let shoebox = fastbootInfo.shoebox;
418420
if (!shoebox) { return; }
419421

420422
for (let key in shoebox) {
421-
if (!shoebox.hasOwnProperty(key)) { continue; }
422-
423+
if (!hasOwnProperty.call(shoebox, key)) { continue; } // TODO: remove this later #144, ember-fastboot/ember-cli-fastboot/pull/417
423424
let value = shoebox[key];
424425
let textValue = JSON.stringify(value);
425426
textValue = escapeJSONString(textValue);

0 commit comments

Comments
 (0)