ecsyjs / ecsy

Entity Component System for javascript
https://ecsyjs.github.io/ecsy/
MIT License
1.11k stars 115 forks source link

Add guard for unavailable `URLSearchParams` #261

Open simonihmig opened 4 years ago

simonihmig commented 4 years ago

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!