Metadata
- Source
- FLUID-6593
- Type
- Bug
- Priority
- Major
- Status
- Closed
- Resolution
- Fixed
- Assignee
- N/A
- Reporter
- Justin Obara
- Created
2021-02-03T09:10:38.310-0500 - Updated
2024-07-22T10:35:20.414-0400 - Versions
- N/A
- Fixed Versions
-
- 4.0
- Component
-
- Framework
Description
In the FLUID-6145 and FLUID-6580 lines of Infusion the included URL Datasource sends the XHR request with a URL Object rather than as a String. It appears that browsers are able to handle this, but when trying to write tests using Sinon's fake server it throws an error: request.replace is not a function (see: https://github.com/sinonjs/nise/blob/f7ab6ec9dcb968e3a0f1d61b16f8d1176e9ba7d0/lib/fake-server/index.js#L89 )
If we look one line above : {{rCurrLoc.test(requestUrl) is returning true likely from the requestURL being implicitly having its toString method called. This lets it fall through to the failing line. However, it may fail later with other operations that may require requestURL be a String.
See conversation in the fluid-tech matrix room: https://matrix.to/#/!JcoHDrfLedPQdFhAXn:matrix.org/$3xzgv3RZdzar9HvBYfEsTDOFDPBwIc6Kbk9LA_oTci4?via=matrix.org