Skip to content

Commit 70724e3

Browse files
committed
test($log): fix up to work with IE8
1 parent 9a0156d commit 70724e3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/ng/logSpec.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,17 @@ describe('$log', function() {
144144
describe('$log.error', function() {
145145
var e, $log, errorArgs;
146146

147+
function TestErrorPrototype() {}
148+
TestErrorPrototype.prototype = Error.prototype;
149+
147150
function TestError() {
148151
Error.prototype.constructor.apply(this, arguments);
149152
this.message = undefined;
150153
this.sourceURL = undefined;
151154
this.line = undefined;
152155
this.stack = undefined;
153156
}
154-
TestError.prototype = Object.create(Error.prototype);
157+
TestError.prototype = new TestErrorPrototype();
155158
TestError.prototype.constructor = TestError;
156159

157160
beforeEach(function() {

0 commit comments

Comments
 (0)