Browse Source

use a constant

Taichi Masuyama 3 years ago
parent
commit
cf48878faf
1 changed files with 2 additions and 1 deletions
  1. 2 1
      packages/app/src/components/PageEditorByHackmd/HackmdEditor.jsx

+ 2 - 1
packages/app/src/components/PageEditorByHackmd/HackmdEditor.jsx

@@ -29,7 +29,8 @@ export default class HackmdEditor extends React.PureComponent {
   }
 
   async initHackmdWithPenpal() {
-    if (document.getElementById('iframe-hackmd') != null) {
+    const shouldInit = document.getElementById('iframe-hackmd') != null;
+    if (shouldInit) {
       return;
     }