Skip to content

Commit 5aaec6d

Browse files
authored
fix: Use nullish coalescing over || op for channel_axis (#115)
1 parent b4ddd89 commit 5aaec6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/io.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ export async function createSourceData(config: ImageLayerConfig): Promise<Source
159159
// If explicit channel axis is provided, try to load as multichannel.
160160
if ('channel_axis' in config || labels.includes('c')) {
161161
config = config as MultichannelConfig;
162-
config.channel_axis = config.channel_axis || labels.indexOf('c');
162+
config.channel_axis = config.channel_axis ?? labels.indexOf('c');
163163
return loadMultiChannel(config, loader, max);
164164
}
165165

0 commit comments

Comments
 (0)