There was an error while loading. Please reload this page.
1 parent 4f4ccda commit 8ac92eaCopy full SHA for 8ac92ea
1 file changed
src/typeschema/utils.ts
@@ -261,10 +261,9 @@ const populateGeneric = (
261
262
const sameParams = (a: GenericParam[], b: GenericParam[]): boolean => {
263
if (a.length !== b.length) return false;
264
- for (let i = 0; i < a.length; i++) {
265
- const x = a[i]!;
266
- const y = b[i]!;
267
- if (x.typeVar !== y.typeVar || !samePath(x.path, y.path) || x.constraint.url !== y.constraint.url)
+ for (const [i, x] of a.entries()) {
+ const y = b[i];
+ if (!y || x.typeVar !== y.typeVar || !samePath(x.path, y.path) || x.constraint.url !== y.constraint.url)
268
return false;
269
}
270
return true;
0 commit comments