Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/DEICH-469_mangler_oppdatering_ved_sletting_av_op…
Browse files Browse the repository at this point in the history
…plysninger'
  • Loading branch information
kristom committed Nov 17, 2016
2 parents f7f4fbd + ba31795 commit 17013c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions redef/catalinker/client/src/ontology.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
if (_.isArray(oldValue) && !_.isArray(currentValue)) {
currentValue = [ currentValue ];
}
if (([ 'string', 'number', 'boolean' ].indexOf(typeof currentValue) > -1) && currentValue != oldValue) {
if (([ 'string', 'number', 'boolean' ].indexOf(typeof currentValue) > -1) && currentValue !== oldValue) {
if (currentValue !== "" && (typeof currentValue !== 'boolean' || currentValue !== false)) {
var addPatch = { op: "add", s: subject, p: predicate, o: { value: currentValue, type: datatype } };
if (oldAndCurrentValue.current.lang !== "") {
Expand All @@ -95,7 +95,7 @@
addPatches.push(addPatch);
}

if (oldValue !== "" && oldValue !== null && currentValue !== '') {
if (oldValue !== "" && oldValue !== null) {
var delPatch = { op: "del", s: subject, p: predicate, o: { value: oldValue } };
if (oldAndCurrentValue.old.lang !== "") {
delPatch.o.lang = oldAndCurrentValue.old.lang;
Expand Down

0 comments on commit 17013c2

Please sign in to comment.