You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create an object with a method defined in its prototype
Use it as payload for a commit
Try to use this method inside mutation callback
See this sandbox for a repro built on class syntactic sugar (I've also added a custom non enumerable property for testing purposes and the property also vanished in vue-devtools payload) : https://codesandbox.io/s/v0x463v235
What is expected?
The prototype (and likely all non enumerable properties) should be available on committed object in payload. It works fine with Vuex and should work fine with vue-devtools as well.
What is actually happening?
It seems vue-devtools only keep enumerable properties of the payload object instead of using the whole object (maybe due to some partial cloning ?).
Therefore, the mutation triggers a not a function TypeError when trying to load state from vue-devtools after the commit
Version
5.0.6
Browser and OS info
Chrome 73.0.3683.86 / Windows 10
Steps to reproduce
See this sandbox for a repro built on class syntactic sugar (I've also added a custom non enumerable property for testing purposes and the property also vanished in vue-devtools payload) : https://codesandbox.io/s/v0x463v235
What is expected?
The prototype (and likely all non enumerable properties) should be available on committed object in payload. It works fine with Vuex and should work fine with vue-devtools as well.
What is actually happening?
It seems vue-devtools only keep enumerable properties of the payload object instead of using the whole object (maybe due to some partial cloning ?).
Therefore, the mutation triggers a
not a function
TypeError when trying to load state from vue-devtools after the commitI'm using a kind of ORM with class instances.
This issue may be related to #935 and #945
The text was updated successfully, but these errors were encountered: