Hello Wix Forum,
I am using wix-storage library to pass around some local and session variables to make my user experience a little more comfy. I deal with these values on the global page (site page/site.js) and at the page level (ie where the page onReady handler is defined). My preview code works like a charm, however it is my published live code that does not conform.
Live code being less verbose and more obscure, I have no idea how to debug my problem. I just got a cryptic:
Uncaught (in promise) TypeError: Cannot read property '4961d984-96b4-372d-bc22-aba921a9cb29' of undefined in reducer.js and an uglier stacktrace. I also believe this is the error that is silencing all the console logs I have stuffed in my code (because none of them appear, to state the obvious :).
- Any ideas how to debug this?
- What is reducer.js?
- How do I work my way back from '4961d984-96b4-372d-bc22-aba921a9cb29' to the real property name? is it through the "maps" (not sure, I believe reading about them recently)?
- How do I get a hold of this cheeky "undefined" object to make it defined? :)
- Is this a common problem that is or could be documented somewhere? (I would be happy to do so)
- How to handle the differences between preview and published code? This is potentially problematic...
Thank you very much :)