Procházet zdrojové kódy

Update path-utils.js

stevenfukase před 4 roky
rodič
revize
83ca4d0843
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      packages/growi-commons/src/util/path-utils.js

+ 2 - 2
packages/growi-commons/src/util/path-utils.js

@@ -18,7 +18,7 @@ function matchSlashes(path) {
  * @memberof pathUtils
  */
 function hasHeadingSlash(path) {
-  if (path == null || path === '') {
+  if (path === '') {
     return false;
   }
   const match = matchSlashes(path);
@@ -32,7 +32,7 @@ function hasHeadingSlash(path) {
  * @memberof pathUtils
  */
 function hasTrailingSlash(path) {
-  if (path == null || path === '') {
+  if (path === '') {
     return false;
   }
   const match = matchSlashes(path);