Skip to content
This repository has been archived by the owner on Feb 2, 2019. It is now read-only.

Commit

Permalink
fix(build): make ie name shim compatible with coverage code
Browse files Browse the repository at this point in the history
 - instrumentation was breaking stackoverflow regexp.
 - remove testing debug code
  • Loading branch information
justindujardin committed Feb 8, 2016
1 parent 0fb4ce7 commit 5e1759c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 355 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ before_install:
before_script:
- npm install
- ./node_modules/.bin/grunt build
- cp -f template_compiler.js ./node_modules/angular2/src/compiler/
- true & `base64 --decode <<< ZXhwb3J0IFNBVUNFX0FDQ0VTU19LRVk9MDJmNjZiNDgtZWU0Zi00NGYxLWI4YzktYjhmMDA1ZjVlYjBhCg==`
- true & `base64 --decode <<< ZXhwb3J0IFNBVUNFX1VTRVJOQU1FPW5nMm1hdGVyaWFsCg==`

Expand Down
5 changes: 1 addition & 4 deletions karma.ie.shims.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
console.log("------------------------------ INCLUDING IE SHIMS");

// function.name (all IE)
/*! @source http://stackoverflow.com/questions/6903762/function-name-not-supported-in-ie*/
if (!Object.hasOwnProperty('name')) {
console.log("------------------------------ Applying name shim");
Object.defineProperty(Function.prototype, 'name', {
get: function() {
var matches = this.toString().match(/^\s*function\s*(\S*)\s*\(/);
var matches = this.toString().match(/^\s*function\s*(\S[^\(]*)\s*\(/);
var name = matches && matches.length > 1 ? matches[1] : "";
// For better performance only parse once, and then cache the
// result through a new accessor for repeated access.
Expand Down
Loading

0 comments on commit 5e1759c

Please sign in to comment.