We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
editor.navigate
1 parent a303b1b commit 3aad24cCopy full SHA for 3aad24c
web/syscalls/editor.ts
@@ -107,8 +107,10 @@ export function editorSyscalls(client: Client): SysCallMapping {
107
ref = parsedRef;
108
}
109
110
- // @ts-ignore: Legacy support
111
- if (ref.kind === "page" || ref.kind === "document") {
+ if (
+ // @ts-ignore: Legacy support
112
+ ref.page !== undefined
113
+ ) {
114
console.warn(
115
"You are using legacy navigation syntax with `editor.navigate()`, this will be phased out in the future",
116
);
@@ -121,6 +123,8 @@ export function editorSyscalls(client: Client): SysCallMapping {
121
123
meta?: boolean;
122
124
};
125
126
+ legacyRef.kind ??= "page";
127
+
128
let details: Ref["details"] = undefined;
129
130
if (typeof legacyRef.pos === "number") {
0 commit comments