You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/08/07 00:12:37 UTC

[GitHub] [incubator-superset] graceguo-supercat commented on a change in pull request #7998: [fix] reduce content in sql lab localStorage

graceguo-supercat commented on a change in pull request #7998: [fix] reduce content in sql lab localStorage
URL: https://github.com/apache/incubator-superset/pull/7998#discussion_r311324466
 
 

 ##########
 File path: superset/assets/src/SqlLab/utils/reduxStateToLocalStorageHelper.js
 ##########
 @@ -35,3 +47,18 @@ export default function emptyQueryResults(queries) {
       return updatedQueries;
     }, {});
 }
+
+export function clearQueryEditors(queryEditors) {
+  return queryEditors.map(editor =>
+    // only return selected keys
+    Object.keys(editor).reduce((accumulator, key) => {
 
 Review comment:
   ```
   const output = acc;
   output[key] = editor[key];
   ```
   this way you will change original copy of accumulator, which makes no sense to assign to a new variable output.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org