Explorar o código

BugFix: saving new page failed with empty string tag

Yuki Takei %!s(int64=6) %!d(string=hai) anos
pai
achega
ee0912cc93
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      src/client/js/services/TagContainer.js

+ 3 - 1
src/client/js/services/TagContainer.js

@@ -49,7 +49,9 @@ export default class TagContainer extends Container {
     }
     // when the page not exist
     else if (templateTagData != null) {
-      tags = templateTagData.split(',');
+      tags = templateTagData.split(',').filter((str) => {
+        return str !== ''; // filter empty values
+      });
     }
 
     logger.debug('tags data has been initialized');