我在我的 wordpress 项目中使用 pushpad.xyz 推送通知。我添加了 pushpad 代码,但我收到了这个我无法理解的错误。
pushpad.js:292 Uncaught TypeError: Cannot read property 'register' of undefined
at Object.registerServiceWorker (pushpad.js:292)
at Object.init (pushpad.js:261)
at init (pushpad.js:362)
at window.pushpad (pushpad.js:548)
at pushpad.js:551
at Array.forEach (<anonymous>)
at pushpad.js:550
at pushpad.js:553
有人可以解释为什么我会收到此错误。因为这个错误只出现在我使用 vagrant 在虚拟机中运行的这个 wordpress 项目中。这是错误的原因吗?如果是,我该如何解决?