Skip to content

Commit

Permalink
Merge pull request #1217 from JosefBredereck/fix-iframe-message
Browse files Browse the repository at this point in the history
Fix event from iframe not evaluated
  • Loading branch information
sghoweri authored Jun 28, 2020
2 parents e780e21 + a7377ee commit e37df7d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
* Does the origin sending the message match the current host?
* if not dev/null the request
*
* @param {MessageEvent} e A message received by a target object.
* @param {MessageEvent} event A message received by a target object.
*/
export function iframeMsgDataExtraction(e) {
export function iframeMsgDataExtraction(event) {
if (
window.location.protocol !== 'file:' &&
event.origin !== window.location.protocol + '//' + window.location.host
) {
return;
return {};
}

try {
Expand Down

0 comments on commit e37df7d

Please sign in to comment.