DEV: already defined constant 'HIGHLIGHTJS_DIR'

DEV: already defined constant ‘HIGHLIGHTJS_DIR’

diff --git a/lib/highlight_js/highlight_js.rb b/lib/highlight_js/highlight_js.rb
index efac999..f4c9c4f 100644
--- a/lib/highlight_js/highlight_js.rb
+++ b/lib/highlight_js/highlight_js.rb
@@ -1,7 +1,7 @@
 # frozen_string_literal: true
 
 module HighlightJs
-  HIGHLIGHTJS_DIR = "#{Rails.root}/vendor/assets/javascripts/highlightjs/"
+  HIGHLIGHTJS_DIR ||= "#{Rails.root}/vendor/assets/javascripts/highlightjs/"
 
   def self.languages
     langs = Dir.glob(HIGHLIGHTJS_DIR + "languages/*.js").map do |path|

GitHub sha: d75510dd

2 Likes

:clap:

3 Likes