Skip to content
This repository was archived by the owner on Feb 7, 2023. It is now read-only.

Commit 7feab4c

Browse files
committed
make sure the protocol isn't file: when returning
1 parent fb7c108 commit 7feab4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

public/styleguide/js/styleguide.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ $('#sg-vp-wrap').click(function(e) {
489489
function receiveIframeMessage(event) {
490490

491491
// does the origin sending the message match the current host? if not dev/null the request
492-
if (event.origin !== window.location.protocol+"//"+window.location.host) {
492+
if ((window.location.protocol != "file:") && (event.origin !== window.location.protocol+"//"+window.location.host)) {
493493
return;
494494
}
495495

0 commit comments

Comments
 (0)