Skip to content

Commit

Permalink
fix bug with log level in enscripten
Browse files Browse the repository at this point in the history
  • Loading branch information
davemarco committed Oct 10, 2024
1 parent b3fde47 commit 7564280
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/clp_ffi_js/ir/StreamReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ void StreamReader::filter_log_events(emscripten::val const& log_level_filter) {
}

m_filtered_log_event_map.emplace();
auto filter_levels{emscripten::vecFromJSArray<LogLevel>(log_level_filter)};
auto filter_levels{emscripten::vecFromJSArray<std::uint8_t>(log_level_filter)};
for (size_t log_event_idx = 0; log_event_idx < m_encoded_log_events.size(); ++log_event_idx) {
auto const& log_event = m_encoded_log_events[log_event_idx];
if (std::ranges::find(filter_levels, log_event.get_log_level()) != filter_levels.end()) {
if (std::ranges::find(filter_levels, static_cast<std::uint8_t>(log_event.get_log_level())) != filter_levels.end()) {
m_filtered_log_event_map->emplace_back(log_event_idx);
}
}
Expand Down

0 comments on commit 7564280

Please sign in to comment.