Skip to content

Commit 007e613

Browse files
adriaandotcomAdriaan
authored andcommitted
Use hasOwnProperty on the queue
1 parent 6a2fddb commit 007e613

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/default.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -773,9 +773,11 @@
773773

774774
// Post events from the queue of the user defined function
775775
for (var event in queue) {
776-
Array.isArray(queue[event])
777-
? sendEvent.apply(null, queue[event])
778-
: sendEvent(queue[event]);
776+
if (Object.prototype.hasOwnProperty.call(queue, event)) {
777+
Array.isArray(queue[event])
778+
? sendEvent.apply(null, queue[event])
779+
: sendEvent(queue[event]);
780+
}
779781
}
780782
/** endif **/
781783
} catch (e) {

0 commit comments

Comments
 (0)