mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 01:12:56 +03:00
fix loadSchema to fetch currentSchema if schemas is empty (#2283)
This commit is contained in:
parent
13a0427614
commit
0957a43563
@ -215,7 +215,11 @@ const setUntrackedRelations = () => (dispatch, getState) => {
|
|||||||
const loadSchema = configOptions => (dispatch, getState) => {
|
const loadSchema = configOptions => (dispatch, getState) => {
|
||||||
const url = Endpoints.getSchema;
|
const url = Endpoints.getSchema;
|
||||||
let allSchemas = getState().tables.allSchemas;
|
let allSchemas = getState().tables.allSchemas;
|
||||||
if (!configOptions || (!configOptions.schemas && !configOptions.tables)) {
|
if (
|
||||||
|
!configOptions ||
|
||||||
|
((!configOptions.schemas || configOptions.schemas.length === 0) &&
|
||||||
|
!configOptions.tables)
|
||||||
|
) {
|
||||||
configOptions = {
|
configOptions = {
|
||||||
schemas: [getState().tables.currentSchema],
|
schemas: [getState().tables.currentSchema],
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user