Skip to content

Commit c5dc7a4

Browse files
authored
controller might not exist (such as in the case of Rails default 404 handling)
1 parent 2f719ec commit c5dc7a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/inertia_rails/middleware.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def version_stale?
7878
end
7979

8080
def server_version
81-
controller.send(:inertia_configuration).version
81+
controller&.send(:inertia_configuration)&.version
8282
end
8383

8484
def coerce_version(version)

0 commit comments

Comments
 (0)