Skip to content

Commit 4a2b743

Browse files
authored
fix: Fix bug when referencing HTMLElement in non-browser environments. (#9050)
1 parent cfa625a commit 4a2b743

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

core/field_dropdown.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,9 @@ export class FieldDropdown extends Field<string> {
800800
option[0] &&
801801
typeof option[0] !== 'string' &&
802802
!isImageProperties(option[0]) &&
803-
!(option[0] instanceof HTMLElement)
803+
!(
804+
typeof HTMLElement !== 'undefined' && option[0] instanceof HTMLElement
805+
)
804806
) {
805807
foundError = true;
806808
console.error(

0 commit comments

Comments
 (0)