Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions public/scripts/views/ntb/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,15 @@ define(function (require, exports, module) {
// console.log('Saving ' + relatedCollection.field);

relatedCollection.collection.save(
// Should rename this argument, but not touching it now
function (relatedCollection) {
if (!!relatedCollection) {
// console.log('All ' + relatedCollection.field + ' synced with server');
// Some bug(?) causes arrays with items not to be
// replaced by another array with items. But it is
// replaced by an empty array. And then the empty
// array can be replaced with the array with IDs
this.model.set(relatedCollection.field, []);
this.model.set(relatedCollection.field, relatedCollection.collection.pluck('_id'));

} else {
Expand Down