Fix item looking for widget when no front end
This commit is contained in:
parent
6d1f919bb7
commit
9e9620c04a
|
@ -36,8 +36,7 @@ helper Admin::PagePartsHelper
|
||||||
|
|
||||||
if @item.module_app
|
if @item.module_app
|
||||||
@module_app = @item.module_app
|
@module_app = @item.module_app
|
||||||
|
@frontend_path = @item.app_frontend_url
|
||||||
@frontend_path = @item.app_frontend_url ? @item.app_frontend_url : @module_app.widgets.keys[0]
|
|
||||||
|
|
||||||
if @module_app && @module_app.widgets && @module_app.widgets.any?{|b| b.class == Array}
|
if @module_app && @module_app.widgets && @module_app.widgets.any?{|b| b.class == Array}
|
||||||
@frontend_style = @module_app.widgets[@frontend_path] if !@frontend_path.blank? && !@module_app.widgets.blank?
|
@frontend_style = @module_app.widgets[@frontend_path] if !@frontend_path.blank? && !@module_app.widgets.blank?
|
||||||
|
|
Loading…
Reference in New Issue