Skip to content
Snippets Groups Projects
Unverified Commit 3bdf9937 authored by Xiao Gui's avatar Xiao Gui
Browse files

fix: only ask for origin when opened by another window

parent 8b6ed8db
No related branches found
No related tags found
No related merge requests found
......@@ -73,6 +73,14 @@ export class MessagingService {
}
window.addEventListener('message', async ({ data, origin, source }) => {
/**
* only deal with opener
*/
if (!window.opener || source !== window.opener) {
return
}
if (/^webpack/.test(data.type)) return
if (!data) return
const { method } = data
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment