diff --git a/app/client/components/GristDoc.ts b/app/client/components/GristDoc.ts index 9eff9dbc..a3416052 100644 --- a/app/client/components/GristDoc.ts +++ b/app/client/components/GristDoc.ts @@ -701,7 +701,7 @@ export class GristDoc extends DisposableWithEvents { const {recordCard, rowId} = popupOptions.hash; if (recordCard) { - if (!rowId || rowId === 'new') { + if (!rowId) { // Should be unreachable, but just to be sure (and to satisfy type checking)... throw new Error('Unable to open Record Card: undefined row id'); } diff --git a/app/client/components/RecordCardPopup.ts b/app/client/components/RecordCardPopup.ts index 7fc1efac..de30ed10 100644 --- a/app/client/components/RecordCardPopup.ts +++ b/app/client/components/RecordCardPopup.ts @@ -7,13 +7,14 @@ import {ViewSectionRec} from 'app/client/models/DocModel'; import {ChangeType, RowList} from 'app/client/models/rowset'; import {theme} from 'app/client/ui2018/cssVars'; import {DisposableWithEvents} from 'app/common/DisposableWithEvents'; +import {UIRowId} from 'app/plugin/GristAPI'; import {dom, makeTestId, styled} from 'grainjs'; const testId = makeTestId('test-record-card-popup-'); interface RecordCardPopupOptions { gristDoc: GristDoc; - rowId: number; + rowId: UIRowId; viewSection: ViewSectionRec; onClose(): void; }