fix(npm): libc field should not be null

closes #4952
This commit is contained in:
Boshen 2024-08-22 23:28:13 +08:00
parent a00bf18b9f
commit 2a5e15d03e
No known key found for this signature in database
GPG key ID: 67715A371E534061
2 changed files with 2 additions and 2 deletions

View file

@ -47,7 +47,7 @@ function generateNativePackage(target) {
const triple = target.split("-");
const platform = triple[0];
const arch = triple[1];
const libc = triple[2] && { libc: [LIBC_MAPPING[triple[2]]] }
const libc = triple[2] && LIBC_MAPPING[triple[2]] && { libc: [LIBC_MAPPING[triple[2]]] }
const manifest = {
name: package_name(target),
version,

View file

@ -47,7 +47,7 @@ function generateNativePackage(target) {
const triple = target.split("-");
const platform = triple[0];
const arch = triple[1];
const libc = triple[2] && { libc: [LIBC_MAPPING[triple[2]]] }
const libc = triple[2] && LIBC_MAPPING[triple[2]] && { libc: [LIBC_MAPPING[triple[2]]] }
const manifest = {
name: package_name(target),
version,