Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.5.0-beta1
Description
To reproduce:
1) Create a gadget that requires both open-views and pubsub-2 features.
2) Make a call to gadgets.views.openGadget(), passing a viewParams object
3) In the newly opened gadget, make a call to gadgets.views.getParams(). You will receive an empty object, regardless of what was passed as a parameter.
What's happening?
1) It looks like pubsub-2 appends an rpc token to the open gadget url in the form of #rpctoken=nzZsoU
2) The resulting url param for views looks like this - view-params: "
#rpctoken=nzZsoU"
2) In the views feature, views.js, line 120: The param goes through json.parse, which fails and returns an empty object
This will probably affect more than just the openviews feature.