소스 검색

Merge branch 'wip-v1.6' into compat-es-2-and-5

Norio Suzuki 9 년 전
부모
커밋
4d9927c4ed
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      resource/js/app.js

+ 4 - 1
resource/js/app.js

@@ -16,7 +16,10 @@ if (!window) {
 }
 
 const mainContent = document.querySelector('#content-main');
-const pageId = mainContent.attributes['data-page-id'].value || null;
+let pageId = null;
+if (mainContent !== null) {
+  pageId = mainContent.attributes['data-page-id'].value;
+}
 
 // FIXME
 const crowi = new Crowi({me: $('#content-main').data('current-username')}, window);