Fix potential crash in page_editor setting access

This commit is contained in:
Eric Schultz 2018-05-22 13:31:19 -05:00
parent 2d4d6d3242
commit 9c162d3f0d

View file

@ -20,7 +20,7 @@ var app = {
, facebook_app_id: "<%= ENV['FACEBOOK_APP_ID'] %>" , facebook_app_id: "<%= ENV['FACEBOOK_APP_ID'] %>"
, map_provider: "<%= Settings.maps&.provider %>" , map_provider: "<%= Settings.maps&.provider %>"
, editor: "<%= Settings.page_editor.editor%>" , editor: "<%= Settings.page_editor.editor%>"
<% if Settings.page_editor.editor == 'froala' and Settings.page_editor.editor_options.froala_key %>, froala_key: "<%= Settings.page_editor.editor_options.froala_key %>"<% end %> <% if Settings&.page_editor&.editor == 'froala' and Settings&.page_editor&.editor_options&.froala_key %>, froala_key: "<%= Settings.page_editor.editor_options.froala_key %>"<% end %>
}; };
var ENV = { var ENV = {