Skip to content

Commit

Permalink
[fix] workaround for bad persistence of boolean values
Browse files Browse the repository at this point in the history
  • Loading branch information
blcham committed Aug 21, 2017
1 parent edb1c3e commit 3cd400e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/util/JsonLdObjectUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ export default class JsonLdObjectUtils {
jsonLdValue1 = (typeof(jsonLdValue1) === 'object') ? jsonLdValue1 : { '@value': jsonLdValue1};
jsonLdValue2 = (typeof(jsonLdValue2) === 'object') ? jsonLdValue2 : { '@value': jsonLdValue2};

// TODO remove: workaround for bad persistance of boolean values -- { @value: "true" } instead of { @value: true }
if ((jsonLdValue1) && (jsonLdValue2) && (JSON.stringify(jsonLdValue2['@value']) === jsonLdValue1['@value'])) {
return true;
}

return jsonld.compareValues(jsonLdValue1, jsonLdValue2);
}

Expand Down

0 comments on commit 3cd400e

Please sign in to comment.