This is an automated email from the ASF dual-hosted git repository. ptaylor pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push: new 5f86317232 MINOR: [JS] Prevent the exception for schema "fields" is null or undefined (#42155) 5f86317232 is described below commit 5f86317232765b542a70e1314ea20201088c9c95 Author: AlbertXingZhang <12808025+albertxingzh...@users.noreply.github.com> AuthorDate: Mon Jun 17 09:20:51 2024 -0700 MINOR: [JS] Prevent the exception for schema "fields" is null or undefined (#42155) --- js/src/schema.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/schema.ts b/js/src/schema.ts index a5b1dcb566..2eb33b7853 100644 --- a/js/src/schema.ts +++ b/js/src/schema.ts @@ -33,7 +33,7 @@ export class Schema<T extends TypeMap = any> { this.fields = (fields || []) as Field<T[keyof T]>[]; this.metadata = metadata || new Map(); if (!dictionaries) { - dictionaries = generateDictionaryMap(fields); + dictionaries = generateDictionaryMap(this.fields); } this.dictionaries = dictionaries; this.metadataVersion = metadataVersion;