From 03370301a7509af4bbc96d60269598bf89c71fe4 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Fri, 24 May 2019 22:25:42 +0900 Subject: NavigateUseCase TabPresenter --- src/background/usecases/NavigateUseCase.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/background/usecases/NavigateUseCase.ts') 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 { 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 = /\/[^/]+$/; -- cgit v1.2.3