Skip to content

Commit 18e43ac

Browse files
committedOct 23, 2018
update: hardening in callback
1 parent fdb5859 commit 18e43ac

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎src/lib/callback.js

+3
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ class EmbedCallback {
7373
* @param {object} data The data received from postMessage
7474
*/
7575
processMethodResponse(data) {
76+
if (!this.promises[data.method]) {
77+
return;
78+
}
7679
var promise = this.promises[data.method].shift();
7780
if (!promise) {
7881
return;

0 commit comments

Comments
 (0)
Please sign in to comment.