Commit c5b05a06 authored by Randall Leeds's avatar Randall Leeds

Remove unnecessary fat arrows

parent 471cb769
......@@ -50,25 +50,25 @@ exports.anchor = (selectors) ->
return range
if fragment?
promise = promise.catch =>
promise = promise.catch ->
Promise.resolve(FragmentAnchor.fromSelector(fragment, options))
.then((a) -> a.toRange(options))
.then(assertQuote)
if range?
promise = promise.catch =>
promise = promise.catch ->
Promise.resolve(RangeAnchor.fromSelector(range, options))
.then((a) -> a.toRange(options))
.then(assertQuote)
if position?
promise = promise.catch =>
promise = promise.catch ->
Promise.resolve(TextPositionAnchor.fromSelector(position, options))
.then((a) -> a.toRange(options))
.then(assertQuote)
if quote?
promise = promise.catch =>
promise = promise.catch ->
Promise.resolve(TextQuoteAnchor.fromSelector(quote, options))
.then((a) -> a.toRange(options))
......
......@@ -109,7 +109,7 @@ exports.anchor = (selectors) ->
return range
if position?
promise = promise.catch =>
promise = promise.catch ->
findPage(position.start)
.then(({index, offset}) ->
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