Merge pull request #1032 from Cutlery-Drawer/csp-fix

Use a hardcoded no-op instead of instancing
This commit is contained in:
Jérémie Astori 2017-08-23 16:00:02 -04:00 committed by GitHub
commit c592551795

View file

@ -36,7 +36,7 @@ var transferFlags = require('./transferFlags');
*/
module.exports = function addProperty(ctx, name, getter) {
getter = getter === undefined ? new Function() : getter;
getter = getter === undefined ? function () {} : getter;
Object.defineProperty(ctx, name,
{ get: function propertyGetter() {