eschutho commented on a change in pull request #11755:
URL: 
https://github.com/apache/incubator-superset/pull/11755#discussion_r537941834



##########
File path: superset-frontend/src/SqlLab/components/ResultSet.tsx
##########
@@ -124,6 +208,187 @@ export default class ResultSet extends 
React.PureComponent<
     }
   }
 
+  handleOnChangeAutoComplete = () => {
+    this.setState({ datasetToOverwrite: {} });
+  };
+
+  handleOverwriteDataset = async () => {
+    const { sql, results } = this.props.query;
+    const { datasetToOverwrite } = this.state;
+
+    if (
+      Object.keys(datasetToOverwrite).length === 0 &&
+      datasetToOverwrite.constructor === Object

Review comment:
       will `Object.keys(datasetToOverwrite).length === 0` ever be true and 
`datasetToOverwrite.constructor === Object` be false? Seems like if the former 
is true, then the constructor will always be an Object? 




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to