on master help sign in
fix: handle throws from pour in Sigil
e012203Matt Condon (shrugs)
src/components/Sigil.js+12−7
@@ -3,11 +3,16 @@ import { pour } from 'sigil-js';
3import ReactSVGComponents from './ReactSVGComponents';
3import ReactSVGComponents from './ReactSVGComponents';
4
4
5export default function Sigil({ patp, size, colorway, ...rest }) {
5export default function Sigil({ patp, size, colorway, ...rest }) {
6+ try {
7+ // https://github.com/urbit/sigil-js/issues/31
6− return pour({
8+ return pour({
7− renderer: ReactSVGComponents,
9+ renderer: ReactSVGComponents,
8− patp,
10+ patp,
9− size,
11+ size,
10− colorway,
12+ colorway,
11− ...rest,
13+ ...rest,
12− });
14+ });
15+ } catch {
16+ return null;
17+ }
13}
18}