johnmichel / Library-Detector-for-Chrome

🔍 Extension that detects which JavaScript libraries are running on a page
https://chrome.google.com/webstore/detail/cgaocdmhkmfnkdkbnckgmpopcbpaaejo
MIT License
658 stars 112 forks source link

error in Workbox library block #178

Closed jimmont closed 3 years ago

jimmont commented 3 years ago

when running extension from master on http://localhost an error in Workbox block is thrown:

TypeError: Cannot read property 'active' of undefined
    at libraries.js:1672
    at async detectLibraries (lib_detect.js:25)
    at async wait (lib_detect.js:39)
    at async chrome-extension:/pkplaekhbmjkdcjidepbncefgamfdjkm/content_scripts/lib_detect.js:47

excerpt from line 1671-1673 of library/libraries.js

          var scriptURL = nav.serviceWorker.controller ? nav.serviceWorker.controller.scriptURL :
            registration.active.scriptURL;
          return fetch(scriptURL,