Skip to content
This repository has been archived by the owner on Jun 4, 2023. It is now read-only.

Commit

Permalink
receiver: fix loop error due to inexistant property
Browse files Browse the repository at this point in the history
When no simulated viewport exists, don't try to delete the
"data-simulated-viewport" property. It seems that browsers like Epiphany
do not like that.

Fix #53
  • Loading branch information
vincentbernat committed Dec 20, 2016
1 parent dec14d2 commit 3142a00
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/scripts/receiver/viewport.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ module.exports = (function(window) {
this.height = dimensions[1] || null;
this.el.dataset.simulatedViewport = spec;
} else {
delete this.el.dataset.simulatedViewport;
if (this.el.dataset.simulatedViewport !== undefined) {
delete this.el.dataset.simulatedViewport;
}
}
}

Expand Down

0 comments on commit 3142a00

Please sign in to comment.