Skip to content

Commit 8071511

Browse files
committed
added handler that sends back message to background script regardless of outcome to prevent message port closed error
1 parent 3b84800 commit 8071511

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ chrome.runtime.onMessage.addListener(({action}, sender, sendRes)=>{
1010
//TODO - Maybe do some clean up here
1111
console.log(err);
1212
})
13+
.then(()=>sendRes({status:'done'}))
1314
}
15+
return true
1416
})
1517
//Make a directory tree and inject it into HTML
1618
const createTree = async (paths) => document.querySelector('#hubtree-modal-inner').innerHTML = render( paths, '',(parent, file, explicit) => `${file}<br>`);

0 commit comments

Comments
 (0)