Properly store User Subclass in Storage#978
Conversation
Codecov Report
@@ Coverage Diff @@
## master #978 +/- ##
=======================================
Coverage 91.86% 91.86%
=======================================
Files 54 54
Lines 5086 5086
Branches 1146 1147 +1
=======================================
Hits 4672 4672
Misses 414 414
Continue to review full report at Codecov.
|
| const path = Storage.generatePath(CURRENT_USER_KEY); | ||
| const json = user.toJSON(); | ||
| json.className = '_User'; | ||
| json.className = user.className || '_User'; |
There was a problem hiding this comment.
how about
json.className = this.constructor.name === 'ParseUser' ? '_User' : this.constructor.name;
i think that'll work and then you don't have to worry about setting this.className.
There was a problem hiding this comment.
Looks like we have a flaky test. I can't restart the build the button is missing, can you?
Edit: Works now
|
This is good. When you guys have it merged, I can switch my use case to this and test for a few days. |
@taivo Let me know if any changes can be made to replicate your issue