Explorar o código

throw err in case that currentPagePath is null

kaori %!s(int64=3) %!d(string=hai) anos
pai
achega
804df1888b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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 {