From 5c88e9ab7edc945eb93ab64d7ec0ad814d12dd21 Mon Sep 17 00:00:00 2001 From: Luka Murn Date: Wed, 22 May 2019 16:36:23 +0200 Subject: [PATCH] Fix 'if..' logic to work properly when WOPI_ENABLED is undefined --- config/initializers/wopi_startup_check.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/wopi_startup_check.rb b/config/initializers/wopi_startup_check.rb index 83b7f07d1..2f24a0036 100644 --- a/config/initializers/wopi_startup_check.rb +++ b/config/initializers/wopi_startup_check.rb @@ -2,7 +2,7 @@ # Only check if connection works when server starts, and if WOPI is # enabled -if defined? Rails::Server && ENV['WOPI_ENABLED'] == 'true' +if defined?(Rails::Server).present? && ENV['WOPI_ENABLED'] == 'true' missing_vars = [] %w( WOPI_TEST_ENABLED WOPI_DISCOVERY_URL WOPI_ENDPOINT_URL USER_SUBDOMAIN