fix(protocol): skip non-addressable system face entries
This commit is contained in:
3 files changed
+125
-7
No files matched your search
@@ -297,7 +297,10 @@ function validateCatalog(packs: SysFacePackEntry[]): SysFacePackEntry[] {
|
||||
for (const [faceIndex, face] of pack.emojis.entries()) {
|
||||
if (!face || typeof face.qSid !== 'string' || !/^(?:0|[1-9]\d*)$/.test(face.qSid)
|
||||
|| !Number.isSafeInteger(Number(face.qSid)) || Number(face.qSid) < 0) {
|
||||
throw new Error(`invalid system face id at pack ${packIndex}, face ${faceIndex}`);
|
||||
throw new Error(
|
||||
`invalid system face id at pack ${packIndex}, face ${faceIndex}: `
|
||||
+ `value=${JSON.stringify(face?.qSid)}`,
|
||||
);
|
||||
}
|
||||
if (seen.has(face.qSid)) {
|
||||
throw new Error(`duplicate system face id ${face.qSid}`);
|
||||
|
||||
Reference in new issue
Block a user