Skip to content

Commit

Permalink
Fix max_index
Browse files Browse the repository at this point in the history
  • Loading branch information
gvidigal-psr committed Aug 12, 2024
1 parent 000d6c3 commit 898d36c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/reader.jl
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ function next_dimension!(reader::Reader)
end

function max_index(reader::Reader, dimension::String)
index = findfirst(isequal(dimension), reader.metadata.dimensions)
symbol_dim = Symbol(dimension)
index = findfirst(isequal(symbol_dim), reader.metadata.dimensions)
if index === nothing
throw(ArgumentError("Dimension $dimension not found in metadata"))
end
Expand Down

0 comments on commit 898d36c

Please sign in to comment.