Commit c5b05a06 authored by Randall Leeds's avatar Randall Leeds

Remove unnecessary fat arrows

parent 471cb769
...@@ -50,25 +50,25 @@ exports.anchor = (selectors) -> ...@@ -50,25 +50,25 @@ exports.anchor = (selectors) ->
return range return range
if fragment? if fragment?
promise = promise.catch => promise = promise.catch ->
Promise.resolve(FragmentAnchor.fromSelector(fragment, options)) Promise.resolve(FragmentAnchor.fromSelector(fragment, options))
.then((a) -> a.toRange(options)) .then((a) -> a.toRange(options))
.then(assertQuote) .then(assertQuote)
if range? if range?
promise = promise.catch => promise = promise.catch ->
Promise.resolve(RangeAnchor.fromSelector(range, options)) Promise.resolve(RangeAnchor.fromSelector(range, options))
.then((a) -> a.toRange(options)) .then((a) -> a.toRange(options))
.then(assertQuote) .then(assertQuote)
if position? if position?
promise = promise.catch => promise = promise.catch ->
Promise.resolve(TextPositionAnchor.fromSelector(position, options)) Promise.resolve(TextPositionAnchor.fromSelector(position, options))
.then((a) -> a.toRange(options)) .then((a) -> a.toRange(options))
.then(assertQuote) .then(assertQuote)
if quote? if quote?
promise = promise.catch => promise = promise.catch ->
Promise.resolve(TextQuoteAnchor.fromSelector(quote, options)) Promise.resolve(TextQuoteAnchor.fromSelector(quote, options))
.then((a) -> a.toRange(options)) .then((a) -> a.toRange(options))
......
...@@ -109,7 +109,7 @@ exports.anchor = (selectors) -> ...@@ -109,7 +109,7 @@ exports.anchor = (selectors) ->
return range return range
if position? if position?
promise = promise.catch => promise = promise.catch ->
findPage(position.start) findPage(position.start)
.then(({index, offset}) -> .then(({index, offset}) ->
textLayer = getPageTextLayer(index) textLayer = getPageTextLayer(index)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment