Skip to content

Commit

Permalink
[form-builder] Minor: fix misleading error messsage
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoerge committed Aug 18, 2017
1 parent 3d53632 commit 5da2fd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@sanity/form-builder/src/patch/primitive.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function apply(value, patch) {
}

if (patch.path.length > 0) {
throw new Error(`Default container cannot apply deep operations. Received patch with type "${patch.type}" and path "${patch.path.join('.')}"`)
throw new Error(`Cannot apply deep operations on primitive values. Received patch with type "${patch.type}" and path "${patch.path.join('.')} that targeted the value "${JSON.stringify(value)}"`)
}

return OPERATIONS[patch.type](value, patch.value)
Expand Down

0 comments on commit 5da2fd5

Please sign in to comment.