Explorar o código

null to avoid init useCurrentPageId w/ empty str

yohei0125 %!s(int64=4) %!d(string=hai) anos
pai
achega
e16c559827
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      packages/app/src/client/services/ContextExtractor.tsx

+ 1 - 1
packages/app/src/client/services/ContextExtractor.tsx

@@ -57,7 +57,7 @@ const ContextExtractorOnce: FC = () => {
    */
   const revisionId = mainContent?.getAttribute('data-page-revision-id');
   const path = decodeURI(mainContent?.getAttribute('data-path') || '');
-  const pageId = mainContent?.getAttribute('data-page-id') || notFoundContext?.getAttribute('data-page-id');
+  const pageId = (mainContent?.getAttribute('data-page-id') || notFoundContext?.getAttribute('data-page-id')) || null;
 
   const revisionCreatedAt = +(mainContent?.getAttribute('data-page-revision-created') || '');