codyml commented on code in PR #22693: URL: https://github.com/apache/superset/pull/22693#discussion_r1068476725
########## superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx: ########## @@ -267,11 +267,12 @@ class DatasourceControl extends React.PureComponent { showSaveDatasetModal, } = this.state; const { datasource, onChange, theme } = this.props; - const isMissingDatasource = datasource?.id == null; + const isMissingDatasource = !datasource || datasource.id === 0; Review Comment: That's cleaner, thanks! This now also covers the original `null` case in case it's still used somewhere I couldn't find, which is probably good. -- 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. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org