Skip to content

Commit 493138d

Browse files
committed
Merge branch 'Saulzi-master'
2 parents 0aa4c2a + 18b0b94 commit 493138d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

tslib.es6.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,15 @@ export function __exportStar(m, exports) {
108108
}
109109

110110
export function __values(o) {
111-
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
111+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
112112
if (m) return m.call(o);
113-
return {
113+
if (o && typeof o.length === "number") return {
114114
next: function () {
115115
if (o && i >= o.length) o = void 0;
116116
return { value: o && o[i++], done: !o };
117117
}
118118
};
119+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
119120
}
120121

121122
export function __read(o, n) {

tslib.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,15 @@ var __importDefault;
145145
};
146146

147147
__values = function (o) {
148-
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
148+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
149149
if (m) return m.call(o);
150-
return {
150+
if (o && typeof o.length === "number") return {
151151
next: function () {
152152
if (o && i >= o.length) o = void 0;
153153
return { value: o && o[i++], done: !o };
154154
}
155155
};
156+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
156157
};
157158

158159
__read = function (o, n) {

0 commit comments

Comments
 (0)