Created
October 26, 2015 10:58
-
-
Save pcbulai/981b573bb44956c8b908 to your computer and use it in GitHub Desktop.
Detect failing function on a minified Angular JS script.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Object.defineProperty(Function.prototype, '$inject', { | |
configurable: true, | |
get: function() { | |
return this.$injectHooked; | |
}, | |
set: function (arr) { | |
if (arr.length && arr[0].length < 3) { | |
console.error('missing @ngInject:', this); | |
} | |
return this.$injectHooked = arr; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment