Skip to content

Commit

Permalink
Use Function constructor in place of eval for rollup's satisfaction
Browse files Browse the repository at this point in the history
  • Loading branch information
ichernev committed Nov 8, 2016
1 parent 2c372df commit a8dcd91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/test/moment/format.js
Expand Up @@ -154,7 +154,7 @@ test('toISOString', function (assert) {
test('inspect', function (assert) {
function roundtrip(m) {
/*jshint evil:true */
return eval(m.inspect());
return (new Function('moment', 'return ' + m.inspect()))(moment);
}
function testInspect(date, string) {
var inspected = date.inspect();
Expand Down

0 comments on commit a8dcd91

Please sign in to comment.