Do not add stripe JS code to layout if stripe is disabled at instance level

This commit is contained in:
Luis Ramos
2020-08-18 16:21:52 +01:00
parent 9771fd7f13
commit d1ef0e0a0b

View File

@@ -38,9 +38,12 @@
%loading
= render "layouts/bugsnag_js"
%script{:src => "https://js.stripe.com/v3/", :type => "text/javascript"}
- if Spree::Config.stripe_connect_enabled
%script{:src => "https://js.stripe.com/v3/", :type => "text/javascript"}
- if !ContentConfig.open_street_map_enabled
%script{src: "//maps.googleapis.com/maps/api/js?libraries=places,geometry#{ ENV['GOOGLE_MAPS_API_KEY'] ? '&key=' + ENV['GOOGLE_MAPS_API_KEY'] : ''} "}
= javascript_include_tag "darkswarm/all"
= javascript_include_tag "web/all"
= render "layouts/i18n_script"