Skip to content

Commit faeed88

Browse files
author
John Haley
committed
Fix bug in sync polling functions
1 parent 0729d3a commit faeed88

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,14 @@ Promise.prototype.isRejected = function () {
153153
return this._state === 2;
154154
}
155155
Promise.prototype.value = function () {
156-
if (!self.isFulfilled()) {
156+
if (!this.isFulfilled()) {
157157
throw new Error('Cannot get a value of an unfulfilled promise.')
158158
}
159159

160160
return this._value;
161161
}
162162
Promise.prototype.reason = function () {
163-
if (!self.isRejected()) {
163+
if (!this.isRejected()) {
164164
throw new Error('Cannot get a rejection reason of a non-rejected promise.')
165165
}
166166

0 commit comments

Comments
 (0)