Skip to content
Snippets Groups Projects
Unverified Commit d7c1b79f authored by Dalton's avatar Dalton Committed by GitHub
Browse files

wait for schemas/tables to load before running permissions grid logic (#16677)

* wait for schemas/tables to load before running permissions grid logic

* don't return grid when given schema's tables are unavailable
parent b81d75e0
No related branches found
No related tags found
No related merge requests found
import { createSelector } from "reselect";
import { push } from "react-router-redux";
import TogglePropagateAction from "./containers/TogglePropagateAction";
......@@ -322,12 +321,17 @@ export const getTablesPermissionsGrid = createSelector(
schemaName: SchemaName,
) => {
const database = metadata.database(databaseId);
if (!groups || !permissions || !database) {
return null;
}
const tables = database.schema(schemaName).tables;
const schema = database.schema(schemaName);
const tables = schema && schema.tables;
if (_.isEmpty(tables)) {
return null;
}
const defaultGroup = _.find(groups, isDefaultGroup);
return {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment