fix: guard Icon src against non-function values to prevent crash
Add defensive check in folds Icon component so that if src is ever undefined or non-function (root cause unknown, possibly data-dependent), the SVG renders empty rather than throwing and crashing the whole app. Also adds postinstall script to re-apply the patch after npm install. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+3
-2
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "lotus-chat",
|
||||
"version": "4.12.1-lotus",
|
||||
"description": "Lotus Chat — Matrix client for Lotus Guild",
|
||||
"description": "Lotus Chat \u2014 Matrix client for Lotus Guild",
|
||||
"main": "index.js",
|
||||
"type": "module",
|
||||
"engines": {
|
||||
@@ -18,7 +18,8 @@
|
||||
"typecheck": "tsc --noEmit",
|
||||
"prepare": "husky install",
|
||||
"commit": "git-cz",
|
||||
"semantic-release": "semantic-release"
|
||||
"semantic-release": "semantic-release",
|
||||
"postinstall": "node scripts/patch-folds.mjs"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{ts,tsx,js,jsx}": "eslint",
|
||||
|
||||
Reference in New Issue
Block a user