Skip to content

Commit

Permalink
avoid double boot
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul-Bob committed Dec 21, 2024
1 parent 286496b commit d3d8144
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/avo/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ class Engine < ::Rails::Engine
isolate_namespace Avo

config.after_initialize do
# This callback is triggered 2 times
# This flag check will avoid to re-execute the logic
next if @already_initialized
@already_initialized = true

# Reset before reloads in development
::Avo.asset_manager.reset

Expand Down

0 comments on commit d3d8144

Please sign in to comment.