Skip to content

Commit

Permalink
Simplify image options type check (#2073)
Browse files Browse the repository at this point in the history
  • Loading branch information
underoot committed Dec 18, 2024
1 parent 3efd68e commit 785bf75
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/style-spec/expression/definitions/image.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {ColorType, ResolvedImageType, StringType} from '../types';
import ResolvedImage from '../types/resolved_image';
import {isExpression} from '..';

import type Color from '../../util/color';
import type {Expression, SerializedExpression} from '../expression';
Expand All @@ -15,7 +14,7 @@ export type ImageOptions = {
}

function isImageOptions(value: unknown) {
if (typeof value !== 'string' && !isExpression(value)) {
if (value !== null && typeof value === 'object') {
return true;
}

Expand Down

0 comments on commit 785bf75

Please sign in to comment.