Latest version (0.21.2) causes error "Uncaught (in promise)"
plibither8 opened this issue · 2 comments
Apologies for the vague title - I couldn't find the root cause of the error.
After updating the package from 0.16.0
to 0.21.2
, my extension (Refined Hacker News) breaks due to an unexpected error. I am using Webpack (much like how Refined GitHub is using it) to build the extension's "dist" files. OptionsSync()
is initiated in the background.js
file. When the extension is run, the entire background.js file breaks and inspecting it shows up this error:
Uncaught TypeError: (intermediate value).define is not a function
...and the lines causing the error:
new webext_options_sync__WEBPACK_IMPORTED_MODULE_0___default.a().define({
defaults: _libs_default_configs__WEBPACK_IMPORTED_MODULE_1__["default"]
});
I can't start to understand what might be causing the error here, so it'd be great if you could take a look at it. Until then, I've downgraded the dependency to use version 0.16.0.
Thanks!
Yeah, 0.20 was a breaking release because I dropped .define()
Now you can use it as new OptionsSync({defaults: .....})
See the updated readme (open the details): https://github.com/bfred-it/webext-options-sync#defaults-definition
Great, it works :)
Thanks a lot for the clarification!