This is bug fix for issue #72.
1. The Bug
Contribution with more than 20,000 characters was not automatically saved and the following error displayed in the browser's console:
2. The Fix
src/auth/authActions.js
- importgetDrafts()
helper; add drafts to response so that it can be loaded when/drafts
URL is accessed;src/helpers/localStorageHelpers.js
- added main methodsgetDrafts()
, add draft to local store, and delete draft from local store;src/post/Write/editorActions.js
- switched adding to and deleting drafts fromuser_metadata
to store;src/post/Write/editorReducer.js
- get drafts directly from payload instead ofuser_metadata
;
3. Other Information
3.1. The Fork
The fix was pushed to my fork - https://github.com/eastmaels/busy.
3.2. The Branch
I pushed the changes to my branch bugfix/save-draft-with-more-than-20k-chars.
3.3. The Commit
My commit was given the hash d5c95ab5050fc53aa76e04fef05afc65bec7a5e0.
3.4. The PR
My PR was PR#78 in utopian-io/utopian.io git repo. Already merged as of this writing.
Open Source Contribution posted via Utopian.io