Skip to content

Commit 15be199

Browse files
committed
[Fixes browsermedia#681] Updating page titles inline
When editing page title, we don't need to update the connector movement paths, so it no longer tries to send the routes information for a given container.
1 parent d4bd6f5 commit 15be199

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

app/controllers/cms/inline_content_controller.rb

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,18 @@ def update
1414
status_label = "Published"
1515
end
1616

17-
# After a page update, all the connector ids change. So we need to send
17+
# After a page update, all the connector ids can change. So we need to send
1818
# the new move up/down/remove paths to client so they will work after an inline update.
19-
connectors = @page.current_connectors(params[:container].to_sym)
2019
routes = []
21-
connectors.each do |c|
22-
routes << {
23-
move_up: cms.move_up_connector_path(c, format: :json),
24-
move_down: cms.move_down_connector_path(c, format: :json),
25-
remove: cms.connector_path(c, format: :json)
26-
}
20+
if params[:container]
21+
connectors = @page.current_connectors(params[:container].to_sym)
22+
connectors.each do |c|
23+
routes << {
24+
move_up: cms.move_up_connector_path(c, format: :json),
25+
move_down: cms.move_down_connector_path(c, format: :json),
26+
remove: cms.connector_path(c, format: :json)
27+
}
28+
end
2729
end
2830
results = {
2931
page_status: page_status,

0 commit comments

Comments
 (0)