diff options
| author | andrewdkim <adkim414@gmail.com> | 2019-11-12 17:30:02 -0500 |
|---|---|---|
| committer | andrewdkim <adkim414@gmail.com> | 2019-11-12 17:30:02 -0500 |
| commit | fb3a8258298589b911c73c18fdb086c8815e27c8 (patch) | |
| tree | c97973e8cc2d828b9ce7486b421fdcf2985c49e2 /src/client/util/History.ts | |
| parent | 4d4db3aecf54a501a981c239feacdfddfe71152c (diff) | |
| parent | ecbe527575bab2cb5f1ced278039ec0a6fc50809 (diff) | |
merge from master
Diffstat (limited to 'src/client/util/History.ts')
| -rw-r--r-- | src/client/util/History.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/util/History.ts b/src/client/util/History.ts index 67c8e931d..899abbe40 100644 --- a/src/client/util/History.ts +++ b/src/client/util/History.ts @@ -16,8 +16,10 @@ export namespace HistoryUtil { initializers?: { [docId: string]: DocInitializerList; }; + safe?: boolean; readonly?: boolean; nro?: boolean; + sharing?: boolean; } export type ParsedUrl = DocUrl; @@ -143,7 +145,7 @@ export namespace HistoryUtil { }; } - addParser("doc", {}, { readonly: true, initializers: true, nro: true }, (pathname, opts, current) => { + addParser("doc", {}, { readonly: true, initializers: true, nro: true, sharing: true }, (pathname, opts, current) => { if (pathname.length !== 2) return undefined; current.initializers = current.initializers || {}; @@ -158,7 +160,7 @@ export namespace HistoryUtil { export function parseUrl(location: Location | URL): ParsedUrl | undefined { const pathname = location.pathname.substring(1); const search = location.search; - const opts = qs.parse(search, { sort: false }); + const opts = search.length ? qs.parse(search, { sort: false }) : {}; let pathnameSplit = pathname.split("/"); const type = pathnameSplit[0]; |
