Skip to content

Commit

Permalink
Simplify ternary operator
Browse files Browse the repository at this point in the history
  • Loading branch information
wschilpat committed Oct 3, 2024
1 parent 4d19edf commit 260ec5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/render/texture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class Texture {
this.useMipmap = Boolean(options && options.useMipmap);

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

Expand Down

0 comments on commit 260ec5e

Please sign in to comment.