Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Commit 5482c90

Browse files
mrkevfacebook-github-bot
authored andcommitted
Fix the build by adding an argument to catch statement
Summary: Turns out D22722736 (36de6f1) broke the OSS build: apparently `catch` without arguments is a [fairly new feature](https://stackoverflow.com/questions/21624456/can-i-use-a-try-catch-in-javascript-without-specifying-the-catch-argument-identi) that UglifyJS doesn't understand. Whoops. It threw: ``` ERROR: Unexpected token: punc «{», expected: punc «(» ``` Go figure. It seems unlikey that it's possible, but it'd be cool if the TravisCI build status could block lands in www. There's no way to get signal about this until after the fact. /: Reviewed By: creedarky Differential Revision: D22771035 fbshipit-source-id: cd61c6a3ca2aab534c99939a4fb7f29a8863c2ea
1 parent 36de6f1 commit 5482c90

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/model/encoding/convertFromHTMLToContentBlocks.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,10 @@ const isValidAnchor = (node: Node) => {
176176
// Just checking whether we can actually create a URI
177177
const _ = new URI(anchorNode.href);
178178
return true;
179-
} catch {
179+
// We need our catch statements to have arguments, else
180+
// UglifyJS (which we use for our OSS builds) will crash.
181+
// eslint-disable-next-line fb-www/no-unused-catch-bindings
182+
} catch (_) {
180183
return false;
181184
}
182185
};

0 commit comments

Comments
 (0)