Skip to content

Commit

Permalink
correct the fact that these might not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
gjtorikian committed Jul 18, 2024
1 parent 597f248 commit eedbf25
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 36 deletions.
9 changes: 4 additions & 5 deletions ext/selma/src/rewriter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -442,13 +442,12 @@ impl SelmaRewriter {

let closure_element_stack = element_stack.clone();

el.end_tag_handlers()
.unwrap()
.push(Box::new(move |_end_tag| {
let mut stack = closure_element_stack.as_ref().borrow_mut();
stack.pop();
if let Some(end_tag_handlers) = el.end_tag_handlers() {
end_tag_handlers.push(Box::new(move |_end_tag| {
closure_element_stack.as_ref().borrow_mut().pop();
Ok(())
}));
}

Ok(())
}));
Expand Down
2 changes: 1 addition & 1 deletion lib/selma/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Selma
VERSION = "0.4.2"
VERSION = "0.4.3"
end
Loading

0 comments on commit eedbf25

Please sign in to comment.