diff options
author | Sam Wilkins <35748010+samwilkins333@users.noreply.github.com> | 2019-09-29 19:04:29 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-29 19:04:29 -0400 |
commit | 89fd714207dbd965dc4b566202ec85bbd7998adf (patch) | |
tree | 4b6279f1fe0157eb79fabd000a55754c33253506 /src/client/util/History.ts | |
parent | c40480ec1a2da84b4223b0605bea2fe19df1104c (diff) | |
parent | 5bd6158a1f839d19f8965bff97a908c89271437d (diff) |
Merge pull request #289 from browngraphicslab/googlephotos_sharing_master
Googlephotos sharing 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]; |