Skip to content

Commit

Permalink
Drop safe navigation operator
Browse files Browse the repository at this point in the history
  • Loading branch information
brodienguyen committed Dec 6, 2024
1 parent 7644ab0 commit 9aae91b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/inertia_rails_contrib/generators_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ def self.guess_the_default_framework(package_json_path = Rails.root.join("packag
if dependencies["@inertiajs/react"]
"react"
elsif dependencies["@inertiajs/svelte"]
version = dependencies["svelte"]&.gsub(/[\^~]/, '') # Remove ^ or ~ from version
version&.start_with?('5') ? "svelte" : "svelte4"
version = dependencies["svelte"].gsub(/[\^~]/, '') # Remove ^ or ~ from version
version.start_with?('5') ? "svelte" : "svelte4"
elsif dependencies["@inertiajs/vue3"]
"vue"
else
Expand Down

0 comments on commit 9aae91b

Please sign in to comment.