This adds a better guard for URLSearchParams eventually not being defined.
I ran into this when running the code in node (context: FastBoot, the Ember.js SSR solution, runs a client-side SPA in node, and has a window global defined - for whatever reason - but not any of the other browser APIs). But IE also does not support URLSearchParams, so this is good to have in general I think!
This adds a better guard for
URLSearchParams
eventually not being defined.I ran into this when running the code in node (context: FastBoot, the Ember.js SSR solution, runs a client-side SPA in node, and has a
window
global defined - for whatever reason - but not any of the other browser APIs). But IE also does not supportURLSearchParams
, so this is good to have in general I think!