You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the current git version of minify-js. The following issue happens from version 0.6.0 (0.5.6 works fine).
When I try minify the code if (a) a, I get the following error with RUST_BACKTRACE=1:
thread 'main' panicked at /home/user/.cargo/git/checkouts/minify-js-4f5cda0ad742d80b/77dae36/rust/src/minify/pass1.rs:379:81:
called `Option::unwrap()` on a `None` value
stack backtrace:
0: rust_begin_unwind
at /rustc/e51e98dde6a60637b6a71b8105245b629ac3fe77/library/std/src/panicking.rs:645:5
1: core::panicking::panic_fmt
at /rustc/e51e98dde6a60637b6a71b8105245b629ac3fe77/library/core/src/panicking.rs:72:14
2: core::panicking::panic
at /rustc/e51e98dde6a60637b6a71b8105245b629ac3fe77/library/core/src/panicking.rs:144:5
3: core::option::Option<T>::unwrap
at /rustc/e51e98dde6a60637b6a71b8105245b629ac3fe77/library/core/src/option.rs:931:21
4: <minify_js::minify::pass1::Pass1 as parse_js::visit::Visitor>::on_syntax_up
at /home/user/.cargo/git/checkouts/minify-js-4f5cda0ad742d80b/77dae36/rust/src/minify/pass1.rs:379:33
5: parse_js::visit::Visitor::visit
at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/parse-js-0.21.0/src/visit.rs:475:7
6: parse_js::visit::Visitor::visit
at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/parse-js-0.21.0/src/visit.rs:77:11
7: minify_js::minify::minify_js
at /home/user/.cargo/git/checkouts/minify-js-4f5cda0ad742d80b/77dae36/rust/src/minify/mod.rs:36:3
8: minify_js::minify
at /home/user/.cargo/git/checkouts/minify-js-4f5cda0ad742d80b/77dae36/rust/src/lib.rs:50:3
9: minify_js_bugfix::main
at ./src/main.rs:9:5
10: core::ops::function::FnOnce::call_once
at /rustc/e51e98dde6a60637b6a71b8105245b629ac3fe77/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
I am using the current git version of
minify-js
. The following issue happens from version0.6.0
(0.5.6
works fine).When I try minify the code
if (a) a
, I get the following error withRUST_BACKTRACE=1
:The error happens here:
minify-js/rust/src/minify/pass1.rs
Line 379 in 77dae36
Please find below the code to reproduce the error:
src/main.rs
:Cargo.toml
:Many thanks for this great library.
The text was updated successfully, but these errors were encountered: