fix adding of metadata only fields, and styling

This commit is contained in:
Art Lowel
2020-02-25 17:01:44 +01:00
parent 644dcf8ce6
commit a8d5ad9c37
11 changed files with 118 additions and 89 deletions

View File

@@ -35,13 +35,11 @@ export class JsonPatchOperationsBuilder {
* A boolean representing if the value to be added is a plain text value
*/
add(path: JsonPatchOperationPathObject, value, first = false, plain = false) {
if ((typeof value === 'object' && hasValue(value.value)) || hasValue(value)) {
this.store.dispatch(
new NewPatchAddOperationAction(
path.rootElement,
path.subRootElement,
path.path, this.prepareValue(value, plain, first)));
}
this.store.dispatch(
new NewPatchAddOperationAction(
path.rootElement,
path.subRootElement,
path.path, this.prepareValue(value, plain, first)));
}
/**