Details
-
Bug
-
Status: Closed (View Workflow)
-
P2
-
Resolution: Done
-
None
-
-
Core: F - Sprint 74
-
Prokopovych
Description
locationService.js contains a RegExp without proper escapes for backslashes which leads to callstack exhaustion. In the UI, this manifests as a broken back button.
export function isQueryResourceModule(module, location) { if (!module) return false; const path = location.pathname; const re = new RegExp(`^${module.route}|^/settings${module.route}`, 'i'); return module.queryResource && path.match(re); }
Running locally, this leads to an error message in the console:
Uncaught SyntaxError: Invalid regular expression: /^/users|^/settings/users/: Stack overflow
which in production appears as
_baseGetAllKeys.js:17 Uncaught RangeError: Maximum call stack size exceeded
at e.exports (_baseGetAllKeys.js:17)
at e.exports (_getAllKeys.js:13)
at e.exports (_equalObjects.js:29)
at e.exports (_baseIsEqualDeep.js:80)
at e (_baseIsEqual.js:25)
at e.exports (isEqual.js:32)
at g (locationService.js:58)
at MainNav.js:87
at Object.M [as dispatch] (createStore.js:172)
at e (<anonymous>:1:40553)
Steps to reproduce:
- In tip of master (folio-testing or snapshot) or 3.2 (https://folio-daisy.aws.indexdata.com) but NOT in 3.1 (https://bugfestq31.folio.ebsco.com)
- Check an item out to a user
- From the checkout page, use the ••• menu then “Loan policy”, Loan details or Item details
- Click browser back button to return to Check out
- At this point the back button should cease to function and there is an error in the JS console.
- From checkout, click the number of open loans in the Borrower section to take you to the Loans page for that user
- use the ••• menu then Loan details or Item details
- Click browser back button to return to Loans
Expected Browser back should return you to last visited page
Actual As of 3.2 release, browser back sometimes doesn't work and there is an error in the JS console.
Additional info While the known user impact isn't severe, Zak sees this as an important bug to fix as we aren't sure what other unknown implications there may be
TestRail: Results
Attachments
Issue Links
- relates to
-
STCOM-602 multiple Dropdown instances cause janky scrolling
-
- Closed
-
-
UIU-1263 UI display limited to 100 open loans when more exist
-
- Closed
-
-
UIU-1264 "414 Request URI Too Long" error when fetching loan policies for 100 open loans
-
- Closed
-
-
UIU-1271 when many open loans are present, scrolling is janky
-
- Closed
-
-
UIU-1292 Loan count reverts to 100 after navigating away from user with 181 Loans
-
- Closed
-