Verified Commit 89b4900c authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3511574 by tom konda, smustgrave: Replace RegExp.test() for simple...

Issue #3511574 by tom konda, smustgrave: Replace RegExp.test() for simple string comparison with String.prototype method possibly
parent 293fe02e
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
  // loaded within an existing "workflow".
  if (
    !pathInfo.currentPathIsAdmin &&
    !/destination=/.test(windowLocation.search)
    !windowLocation.search.includes('destination=')
  ) {
    sessionStorage.setItem('escapeAdminPath', windowLocation);
  }
+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@
      if (queryString !== '') {
        // If there is a '?' in ajaxPath, clean URL are on and & should be
        // used to add parameters.
        queryString = (/\?/.test(ajaxPath) ? '&' : '?') + queryString;
        queryString = (ajaxPath.includes('?') ? '&' : '?') + queryString;
      }
    }