Skip to content

Commit cf7e29f

Browse files
committed
fix: Remove array support from inferType.
I believe this was always broken, because the oid of a boolean[] is not the same as the oid of a boolean, and AFAICT inferType was resolving "boolean[] --> the oid of a boolean" without any attempt to translate over to the `boolean[]` oid. There's talk of removing `inferType` entirely, which would have to wait until v4, but I think if this array-based support has always been broken (afaiu?), we can just remove it immediately in a v3 bug fix release. Fixes porsager#471
1 parent 089214e commit cf7e29f

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/types.js

-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ export const inferType = function inferType(x) {
224224
x instanceof Uint8Array ? 17 :
225225
(x === true || x === false) ? 16 :
226226
typeof x === 'bigint' ? 20 :
227-
Array.isArray(x) ? inferType(x[0]) :
228227
0
229228
)
230229
}

0 commit comments

Comments
 (0)