Просмотр исходного кода

throw err in case that currentPagePath is null

kaori 3 лет назад
Родитель
Сommit
804df1888b
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      packages/app/src/stores/page-redirect.tsx

+ 1 - 1
packages/app/src/stores/page-redirect.tsx

@@ -15,7 +15,7 @@ export const useRedirectFrom = (initialData?: string): SWRResponseWithUtils<Redi
   const utils = {
     unlink: async() => {
       if (currentPagePath == null) {
-        return;
+        throw Error('currentPagePath should not be null');
       }
 
       try {