message: Check that relationships exist before iterating on them
diff: @@ -123,9 +123,9 @@ export default class OsfSerializer extends JSONAPISerializer.extend({
  delete serialized.data.attributes[attribute];
  }
  }
  -
  // HACK: There's no public-API way to tell whether a relationship has been changed.
  const relationships = (snapshot as any)._internalModel._relationships.initializedRelationships;
  + if (serialized.data.relationships) {
  for (const key of Object.keys(serialized.data.relationships)) {
  const rel = relationships[camelize(key)];
  if (rel
  @@ -136,6 +136,7 @@ export default class OsfSerializer extends JSONAPISerializer.extend({
  }
  }
  }
  + }
  return serialized;
  },
  