Closed tarunc closed 10 years ago
Wrapping https://github.com/dylanb/gulp-coverage/blob/master/contrib/templates/instrumentation_header.js#L24 in a try/catch statement seems to work.
try{
Object.defineProperty && Object.defineProperty(obj, '__instrumented_miss', {enumerable: false, writable: true});
}catch(e){obj.__instrumented_miss = [];}
I think this is the correct fix here:
typeof obj === 'object' && Object.defineProperty && Object.defineProperty(obj, '__instrumented_miss', {enumerable: false, writable: true});
Fixed in 0.1.23, please validate
Yes, that works! Thanks for fixing this so quickly!
The relevant code is:
Here is the instrumented code: