Skip to content

Commit

Permalink
[mutator] Eliminated two extraneous calls to JSON.stringify (#552)
Browse files Browse the repository at this point in the history
Just a slight optimization.
  • Loading branch information
simen authored and bjoerge committed Feb 1, 2018
1 parent b1ddb43 commit 5281f56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/@sanity/mutator/src/document/Mutation.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export default class Mutation {
this.compile()
}
const result = this.compiled(document)
debug(` => ${JSON.stringify(result)}`)
debug(' => %O', result)
return result
}
static applyAll(document: Object, mutations: Array<Mutation>): Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default class BufferedDocumentTester {
previousRev: fromRev,
mutations: [operation]
})
debug(`Local mutation: ${JSON.stringify(mut)}`)
debug('Local mutation: %O', mut)
this.doc.add(mut)
return this
}
Expand Down

0 comments on commit 5281f56

Please sign in to comment.