Skip to content

Commit 260ec5e

Browse files
Simplify ternary operator
1 parent 4d19edf commit 260ec5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/render/texture.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export class Texture {
6060
this.useMipmap = Boolean(options && options.useMipmap);
6161

6262
// Use default maplibre format gl.RGBA to remain compatible with all users of the Texture class
63-
const newFormat = options && options.format ? options.format : gl.RGBA;
63+
const newFormat = options?.format ?? gl.RGBA;
6464
const formatChanged = this.format !== newFormat;
6565
this.format = newFormat;
6666

0 commit comments

Comments
 (0)