lib/uglifier.rb in uglifier-4.1.8 vs lib/uglifier.rb in uglifier-4.1.9
- old
+ new
@@ -342,13 +342,19 @@
DEFAULTS[:output][:comments]
end
end
def output_options
- DEFAULTS[:output].merge(@options[:output] || {}).merge(
- :comments => comment_options,
- :quote_style => quote_style
- )
+ migrate_braces(DEFAULTS[:output].merge(@options[:output] || {}))
+ .merge(:comments => comment_options, :quote_style => quote_style)
+ end
+
+ def migrate_braces(options)
+ if harmony?
+ options
+ else
+ options.merge(:braces => options[:bracketize]).delete_if { |key| key == :bracketize }
+ end
end
def ie8?
@options.fetch(:ie8, DEFAULTS[:ie8])
end