From 6342c59936e019d71855624e5b39307699f01833 Mon Sep 17 00:00:00 2001 From: Soreine Date: Thu, 10 Nov 2016 10:38:39 +0100 Subject: [PATCH] Style pass on ternary indentation --- src/transforms/apply-operation.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/transforms/apply-operation.js b/src/transforms/apply-operation.js index 14870b4af..826d3f528 100644 --- a/src/transforms/apply-operation.js +++ b/src/transforms/apply-operation.js @@ -149,11 +149,11 @@ function joinNode(state, operation) { // Update selection if we merged two texts together if (deep || second.kind == 'text') { const firstText = deep - ? first.getLastText() - : first + ? first.getLastText() + : first const secondText = deep - ? second.getFirstText() - : second + ? second.getFirstText() + : second const { anchorKey, anchorOffset, focusKey, focusOffset } = selection // The final key is the `first` key @@ -429,11 +429,11 @@ function splitNode(state, operation) { const node = document.assertPath(path) // The text node that was split const splittedText = node.kind == 'text' - ? node - : node.getTextAtOffset(offset) + ? node + : node.getTextAtOffset(offset) const textOffset = node.kind == 'text' - ? offset - : offset - node.getOffset(splittedText.key) + ? offset + : offset - node.getOffset(splittedText.key) // Should we update the selection ? const shouldUpdateAnchor = splittedText.key == anchorKey && textOffset <= anchorOffset