Skip to content

Commit

Permalink
MINOR: [JS] Prevent the exception for schema "fields" is null or unde…
Browse files Browse the repository at this point in the history
…fined (apache#42155)
  • Loading branch information
AlbertXingZhang authored Jun 17, 2024
1 parent ad4ff47 commit 5f86317
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5f86317

Please sign in to comment.