mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Remove 'new' from IDocPage
Summary: The value seems unused Test Plan: This is me testing if it's actually unused Reviewers: dsagal Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D3244
This commit is contained in:
@@ -10,7 +10,7 @@ import {Document} from 'app/common/UserAPI';
|
||||
import clone = require('lodash/clone');
|
||||
import pickBy = require('lodash/pickBy');
|
||||
|
||||
export type IDocPage = number | 'new' | 'code' | 'acl' | 'GristDocTour';
|
||||
export type IDocPage = number | 'code' | 'acl' | 'GristDocTour';
|
||||
|
||||
// What page to show in the user's home area. Defaults to 'workspace' if a workspace is set, and
|
||||
// to 'all' otherwise.
|
||||
@@ -356,8 +356,8 @@ export function userOverrideParams(email: string|null, extraState?: IGristUrlSta
|
||||
* parseDocPage is a noop if p is 'new' or 'code', otherwise parse to integer
|
||||
*/
|
||||
function parseDocPage(p: string) {
|
||||
if (['new', 'code', 'acl', 'GristDocTour'].includes(p)) {
|
||||
return p as 'new'|'code'|'acl'|'GristDocTour';
|
||||
if (['code', 'acl', 'GristDocTour'].includes(p)) {
|
||||
return p as 'code'|'acl'|'GristDocTour';
|
||||
}
|
||||
return parseInt(p, 10);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user