@whatwg-node/disposablestack 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -61,12 +61,16 @@ class PonyfillAsyncDisposableStack {
|
|
|
61
61
|
if (res$?.then) {
|
|
62
62
|
return res$.then(() => {
|
|
63
63
|
if (this._error) {
|
|
64
|
-
|
|
64
|
+
const error = this._error;
|
|
65
|
+
this._error = undefined;
|
|
66
|
+
throw error;
|
|
65
67
|
}
|
|
66
68
|
});
|
|
67
69
|
}
|
|
68
70
|
if (this._error) {
|
|
69
|
-
|
|
71
|
+
const error = this._error;
|
|
72
|
+
this._error = undefined;
|
|
73
|
+
throw error;
|
|
70
74
|
}
|
|
71
75
|
return undefined;
|
|
72
76
|
}
|
package/cjs/DisposableStack.js
CHANGED
|
@@ -48,7 +48,12 @@ class PonyfillDisposableStack {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
[symbols_js_1.DisposableSymbols.dispose]() {
|
|
51
|
-
|
|
51
|
+
this._iterateCallbacks();
|
|
52
|
+
if (this._error) {
|
|
53
|
+
const error = this._error;
|
|
54
|
+
this._error = undefined;
|
|
55
|
+
throw error;
|
|
56
|
+
}
|
|
52
57
|
}
|
|
53
58
|
[Symbol.toStringTag] = 'DisposableStack';
|
|
54
59
|
}
|
|
@@ -58,12 +58,16 @@ export class PonyfillAsyncDisposableStack {
|
|
|
58
58
|
if (res$?.then) {
|
|
59
59
|
return res$.then(() => {
|
|
60
60
|
if (this._error) {
|
|
61
|
-
|
|
61
|
+
const error = this._error;
|
|
62
|
+
this._error = undefined;
|
|
63
|
+
throw error;
|
|
62
64
|
}
|
|
63
65
|
});
|
|
64
66
|
}
|
|
65
67
|
if (this._error) {
|
|
66
|
-
|
|
68
|
+
const error = this._error;
|
|
69
|
+
this._error = undefined;
|
|
70
|
+
throw error;
|
|
67
71
|
}
|
|
68
72
|
return undefined;
|
|
69
73
|
}
|
package/esm/DisposableStack.js
CHANGED
|
@@ -45,7 +45,12 @@ export class PonyfillDisposableStack {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
[DisposableSymbols.dispose]() {
|
|
48
|
-
|
|
48
|
+
this._iterateCallbacks();
|
|
49
|
+
if (this._error) {
|
|
50
|
+
const error = this._error;
|
|
51
|
+
this._error = undefined;
|
|
52
|
+
throw error;
|
|
53
|
+
}
|
|
49
54
|
}
|
|
50
55
|
[Symbol.toStringTag] = 'DisposableStack';
|
|
51
56
|
}
|