Skip to content

Commit

Permalink
fix: Use nullish coalescing over || op for channel_axis (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
manzt authored Aug 18, 2021
1 parent b4ddd89 commit 5aaec6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/io.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export async function createSourceData(config: ImageLayerConfig): Promise<Source
// If explicit channel axis is provided, try to load as multichannel.
if ('channel_axis' in config || labels.includes('c')) {
config = config as MultichannelConfig;
config.channel_axis = config.channel_axis || labels.indexOf('c');
config.channel_axis = config.channel_axis ?? labels.indexOf('c');
return loadMultiChannel(config, loader, max);
}

Expand Down

0 comments on commit 5aaec6d

Please sign in to comment.