aboutsummaryrefslogtreecommitdiff
path: root/src/background/usecases/NavigateUseCase.ts
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-05-24 22:25:42 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2019-05-24 22:25:42 +0900
commit03370301a7509af4bbc96d60269598bf89c71fe4 (patch)
treebddfea01bb941e76aeccc21aab79ceb0e7d5f9d7 /src/background/usecases/NavigateUseCase.ts
parent45a10d93c741da285937e6d13401d39c65ee609d (diff)
NavigateUseCase TabPresenter
Diffstat (limited to 'src/background/usecases/NavigateUseCase.ts')
-rw-r--r--src/background/usecases/NavigateUseCase.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/background/usecases/NavigateUseCase.ts b/src/background/usecases/NavigateUseCase.ts
index ced2a0b..152339a 100644
--- a/src/background/usecases/NavigateUseCase.ts
+++ b/src/background/usecases/NavigateUseCase.ts
@@ -33,9 +33,9 @@ export default class NavigateUseCase {
async openParent(): Promise<void> {
let tab = await this.tabPresenter.getCurrent();
let url = new URL(tab.url!!);
- if (url.hash !== '') {
+ if (url.hash.length > 0) {
url.hash = '';
- } else if (url.search !== '') {
+ } else if (url.search.length > 0) {
url.search = '';
} else {
const basenamePattern = /\/[^/]+$/;