diff --git a/app/views/editor/rich.html.erb b/app/views/editor/rich.html.erb index 1cc6ba850e..66cbb132ec 100644 --- a/app/views/editor/rich.html.erb +++ b/app/views/editor/rich.html.erb @@ -38,7 +38,7 @@
@@ -163,7 +163,7 @@ --> - + @@ -190,7 +190,7 @@ 2 steps left - + @@ -218,9 +218,13 @@ <% if params[:redirect] == 'question' %> redirect: 'redirect', <% end %> - <% if (@node && @node.errors.size > 0) || (@revision && @revision.errors.size > 0) %> - errors: <%=raw (@node.errors.to_h.merge(@revision.errors.to_h)).to_json %>, - <% end %> + <% if (@node && @node.errors.size > 0) && (@revision && @revision.errors.size > 0) %> + errors: <%=raw (@node.errors.to_h.merge(@revision.errors.to_h)).to_json %>, + <% elsif (@node && @node.errors.size > 0) %> + errors: <%=raw (@node.errors.to_h).to_json %>, + <% elsif (@revision && @revision.errors.size > 0) %> + errors: <%=raw (@revision.errors.to_h).to_json %>, + <% end %> format: 'publiclab', publishCallback: function publishCallback(response) { // parse and display errors! @@ -250,7 +254,7 @@ suggestRelated: true, fetchRelated: function(show) { $.getJSON("/api/srch/notes?srchString=" + editor.titleModule.value(), function(response) { - /* API provides: + /* API provides: {"items":[{ "docId":14022, "docType":"file",