We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d19edf commit 260ec5eCopy full SHA for 260ec5e
src/render/texture.ts
@@ -60,7 +60,7 @@ export class Texture {
60
this.useMipmap = Boolean(options && options.useMipmap);
61
62
// 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;
+ const newFormat = options?.format ?? gl.RGBA;
64
const formatChanged = this.format !== newFormat;
65
this.format = newFormat;
66
0 commit comments