fix: handle throws from pour in Sigil
commite012203aa2bc0bd063dd5a0002268d8fbadbf913
authorMatt Condon (shrugs) <mattgcondon@gmail.com>
dateMon 1 Jul 2019, 13:07 (7 years ago)
parentf7db190
src/components/Sigil.js+12−7
@@ -3,11 +3,16 @@ import { pour } from 'sigil-js';
33import ReactSVGComponents from './ReactSVGComponents';
44
55export default function Sigil({ patp, size, colorway, ...rest }) {
6− return pour({
7− renderer: ReactSVGComponents,
8− patp,
9− size,
10− colorway,
11− ...rest,
12− });
6+ try {
7+ // https://github.com/urbit/sigil-js/issues/31
8+ return pour({
9+ renderer: ReactSVGComponents,
10+ patp,
11+ size,
12+ colorway,
13+ ...rest,
14+ });
15+ } catch {
16+ return null;
17+ }
1318}