fix loadSchema to fetch currentSchema if schemas is empty (#2283)

This commit is contained in:
Aravind Shankar 2019-05-27 20:07:51 +05:30 committed by Rikin Kachhia
parent 13a0427614
commit 0957a43563

View File

@ -215,7 +215,11 @@ const setUntrackedRelations = () => (dispatch, getState) => {
const loadSchema = configOptions => (dispatch, getState) => {
const url = Endpoints.getSchema;
let allSchemas = getState().tables.allSchemas;
if (!configOptions || (!configOptions.schemas && !configOptions.tables)) {
if (
!configOptions ||
((!configOptions.schemas || configOptions.schemas.length === 0) &&
!configOptions.tables)
) {
configOptions = {
schemas: [getState().tables.currentSchema],
};