File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
apps/debugger-extension/entrypoints Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -78,20 +78,19 @@ export default defineContentScript({
7878
7979 internal_queue = value ;
8080 const originalPush = value . push ;
81- value . push = ( args ) => {
82- if ( ! Array . isArray ( args ) ) {
83- console . log ( `[JSTC DEBUGGER] some invalid value pushed to the ${ queueName } ` ) ;
84- } else {
81+ value . push = ( ...args ) => {
82+ for ( const arg of args ) {
8583 sendMessage ( {
8684 type : messageEventType ,
8785 source : 'JSTC_DBG' ,
8886 payload : {
89- data : formatPushArgs ( args ) ,
87+ data : formatPushArgs ( arg ) ,
9088 stack : new Error ( ) . stack ,
9189 } ,
9290 } ) ;
9391 }
94- originalPush ( args ) ;
92+
93+ originalPush ( ...args ) ;
9594 } ;
9695 return ;
9796 }
@@ -114,7 +113,6 @@ export default defineContentScript({
114113 // Piwik/PPAS object, when that object is defined we are sure that JSTC has loaded
115114 set : function ( value ) {
116115 if ( Array . isArray ( internal_queue ) ) {
117- // TODO: send message that JSTC has been initialized
118116 internal_queue . forEach ( ( args ) => {
119117 if ( ! Array . isArray ( args ) ) {
120118 return ;
You can’t perform that action at this time.
0 commit comments