Skip to content
This repository was archived by the owner on Mar 16, 2026. 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
7 changes: 2 additions & 5 deletions fields/types/relationship/RelationshipType.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,7 @@ relationship.prototype.updateItem = function (item, data, callback) {
}

var value = this.getValueFromData(data);
if (value === undefined) {
return process.nextTick(callback);
}


// Are we handling a many relationship or just one value?
if (this.many) {
var arr = item.get(this.path);
Expand All @@ -244,7 +241,7 @@ relationship.prototype.updateItem = function (item, data, callback) {
if (value && value !== item.get(this.path)) {
// If it's set and has changed, I do.
item.set(this.path, value);
} else if (!value && item.get(this.path)) {
} else if ((value === undefined || !value) && item.get(this.path)) {
Comment thread
millsy marked this conversation as resolved.
// If it's not set and it was set previously, I need to clear.
item.set(this.path, null);
}
Expand Down