Yuki Takei пре 4 година
родитељ
комит
a079fad731

+ 2 - 1
packages/app/src/server/models/page.js

@@ -18,6 +18,7 @@ const { pathUtils } = require('growi-commons');
 const escapeStringRegexp = require('escape-string-regexp');
 
 const { isTopPage, isTrashPage } = pagePathUtils;
+const { checkTemplatePath } = templateChecker;
 
 const logger = loggerFactory('growi:models:page');
 
@@ -312,7 +313,7 @@ module.exports = function(crowi) {
   };
 
   pageSchema.methods.isTemplate = function() {
-    return templateChecker(this.path);
+    return checkTemplatePath(this.path);
   };
 
   pageSchema.methods.isLatestRevision = function() {

+ 2 - 1
packages/ui/src/components/PagePath/PageListMeta.jsx

@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
 import { templateChecker, pagePathUtils } from '@growi/core';
 
 const { isTopPage } = pagePathUtils;
+const { checkTemplatePath } = templateChecker;
 
 export class PageListMeta extends React.Component {
 
@@ -17,7 +18,7 @@ export class PageListMeta extends React.Component {
 
     // template check
     let templateLabel;
-    if (templateChecker(page.path)) {
+    if (checkTemplatePath(page.path)) {
       templateLabel = <span className="badge badge-info">TMPL</span>;
     }