File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ import { Permission } from "@App/model/do/permission";
1212import { Script } from "@App/model/do/script" ;
1313import { Value } from "@App/model/do/value" ;
1414import { execMethod , getIcon } from "./utils" ;
15- import { Tab } from "@App/views/components/Tab" ;
1615
1716class postMessage implements IPostMessage {
1817
@@ -531,9 +530,10 @@ export class BackgroundGrant {
531530 data . append ( val . key , val . val ) ;
532531 }
533532 }
534- config . data = data ;
533+ xhr . send ( data ) ;
534+ } else {
535+ xhr . send ( config . data ) ;
535536 }
536- xhr . send ( config . data ) ;
537537 return resolve ( undefined ) ;
538538 } ) ;
539539 }
Original file line number Diff line number Diff line change @@ -28,12 +28,16 @@ export class BrowserMsg {
2828 }
2929
3030 public send ( topic : string , msg : any ) {
31- let detail = {
31+ let detail = Object . assign ( { } , {
3232 topic : topic ,
3333 msg : msg ,
34- } ;
34+ } ) ;
3535 if ( ( < any > global ) . cloneInto ) {
36- detail = ( < any > global ) . cloneInto ( detail , document . defaultView ) ;
36+ try {
37+ detail = ( < any > global ) . cloneInto ( detail , document . defaultView ) ;
38+ } catch ( e ) {
39+ console . log ( e ) ;
40+ }
3741 }
3842 let ev = new CustomEvent ( this . id + ( this . content ? 'fd' : 'ct' ) , {
3943 detail : detail ,
You can’t perform that action at this time.
0 commit comments