visionmedia / page.js

Micro client-side router inspired by the Express router
http://visionmedia.github.com/page.js
7.67k stars 687 forks source link

unsafe-eval error #458

Closed bradmarder closed 6 years ago

bradmarder commented 6 years ago

var hasProcess = new Function('return typeof process')() !== 'undefined';

The above line of code triggers an unsafe-eval error (if a content security policy is set).

Is there a way to rewrite that line without having to eval it?

matthewp commented 6 years ago

Oh, arg, I didn't think about csp. Luckily we are getting rid of that eval in https://github.com/visionmedia/page.js/pull/454. So I'll try to get that worked out soon.

matthewp commented 6 years ago

This is fixed in https://github.com/visionmedia/page.js/releases/tag/1.8.3. Thanks for filing!