should-create-wip-page.ts 367 B

1234567891011121314
  1. import { checkTemplatePath } from '@growi/core/dist/utils/template-checker';
  2. /**
  3. * Returns Whether to create pages with the wip flag
  4. * @param {string|undefined} path
  5. * @returns {boolean}
  6. */
  7. export const shouldCreateWipPage = (path?: string): boolean => {
  8. if (path == null) {
  9. return true;
  10. }
  11. return !(checkTemplatePath(path) || path === '/Sidebar');
  12. };