lib/js_dependency/cli.rb in js_dependency-0.3.3 vs lib/js_dependency/cli.rb in js_dependency-0.3.3.1
- old
+ new
@@ -26,10 +26,10 @@
child_analyze_level = options[:child_analyze_level] || args["child_analyze_level"] || 2
parent_analyze_level = options[:parent_analyze_level] || args["parent_analyze_level"] || 2
output_path = options[:output_path] || args["output_path"] || nil
alias_paths = args["alias_paths"] || nil
name_level = options[:name_level] || args["name_level"] || 1
- excludes = if options[:excludes].length.positive?
+ excludes = if options[:excludes]&.length&.positive?
options[:excludes]
elsif args["excludes"]
args["excludes"]
end