Skip to content

Commit

Permalink
Fix compiler flag for dynamic require errors
Browse files Browse the repository at this point in the history
  • Loading branch information
adambeynon committed Oct 24, 2013
1 parent edddc0f commit e6d2a7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/opal/cli_options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def initialize
dynamic_require_levels = %w[error warning ignore]
opts.on('-D', '--dynamic-require LEVEL', dynamic_require_levels,
'Set levelDynamic require severity') do |level|
options[:dynamic_require_severity] = level
options[:dynamic_require_severity] = level.to_sym
end

opts.on('-P', '--no-source-map', 'Disable source map') do |value|
Expand Down
2 changes: 1 addition & 1 deletion lib/opal/compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def handle_require_sexp(sexp)
end
end

case @dynamic_require_severity
case dynamic_require_severity
when :error
error "Cannot handle dynamic require"
when :warning
Expand Down

0 comments on commit e6d2a7d

Please sign in to comment.