(core) Fix non-existent page ID showing all raw data widgets

Summary: Check that view exists first, otherwise fall back to default

Test Plan: Manual

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3260
This commit is contained in:
Alex Hall
2022-02-10 15:17:46 +02:00
parent 592a43ec36
commit 1c855537d6
2 changed files with 15 additions and 8 deletions

View File

@@ -10,7 +10,7 @@ import {Document} from 'app/common/UserAPI';
import clone = require('lodash/clone');
import pickBy = require('lodash/pickBy');
const SpecialDocPage = StringUnion('code', 'acl', 'data', 'GristDocTour');
export const SpecialDocPage = StringUnion('code', 'acl', 'data', 'GristDocTour');
type SpecialDocPage = typeof SpecialDocPage.type;
export type IDocPage = number | SpecialDocPage;