Fix 'if..' logic to work properly when WOPI_ENABLED is undefined

This commit is contained in:
Luka Murn 2019-05-22 16:36:23 +02:00
parent 4136aa0575
commit 5c88e9ab7e

View file

@ -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