| [22:39:20] | * natewrench123456 has joined #farmos |
| [22:40:54] | * natewrench123456 has quit (Quit: Leaving) |
| [06:23:25] | <mstenta[m]> | <symbioquine[m]> "Maybe something's wrong with how..." <- symbioquine paul121 : ah ha! i figured this one out... |
| [06:23:47] | <mstenta[m]> | This is what we have now: `new URL('/assets/geojson/' + geomType + '/' + assetType, window.location.origin + drupalSettings.path.baseUrl);` |
| [06:24:08] | <mstenta[m]> | If I remove the leading `/` from that, then it works correctly in a subdirectory. |
| [06:24:20] | <mstenta[m]> | eg: `new URL('assets/geojson/' + geomType + '/' + assetType, window.location.origin + drupalSettings.path.baseUrl);` |
| [06:25:42] | <mstenta[m]> | Here's the explanation from MDN's `URL()` docs: |
| [06:25:42] | <mstenta[m]> | > The constructor takes a `url` parameter, and an optional `base` parameter to use as a base if the `url` parameter is a relative URL |
| [06:25:42] | <mstenta[m]> | https://developer.mozilla.org/en-US/docs/Web/API/URL#usage_notes |
| [06:26:16] | <mstenta[m]> | We are passing the optional `base` parameter, but we are using an absolute `url` |
| [06:26:27] | <mstenta[m]> | TIL! |
| [10:26:14] | <paul121[m]> | Ooooh! Interesting. Easy fix |
| [10:43:36] | <symbioquine[m]> | Hah! Nice! 😁 |
| [16:51:41] | * sgoodall has quit (Ping timeout: 252 seconds) |
| [16:53:21] | * sgoodall has joined #farmos |