Fix warning

This commit is contained in:
Jarred Sumner
2023-10-27 02:20:51 -07:00
parent 7485c7c7cb
commit 700f932ddf

View File

@@ -1230,10 +1230,13 @@ JSC::EncodedJSValue KeyObject__createSecretKey(JSC::JSGlobalObject* lexicalGloba
auto impl = CryptoKeyHMAC::generateFromBytes(data, byteLength, CryptoAlgorithmIdentifier::HMAC, true, CryptoKeyUsageSign | CryptoKeyUsageVerify).releaseNonNull();
return JSC::JSValue::encode(JSCryptoKey::create(structure, globalObject, WTFMove(impl)));
}
default:
throwException(lexicalGlobalObject, scope, createTypeError(lexicalGlobalObject, "ERR_INVALID_ARG_TYPE: expected Buffer or array-like object"_s));
return JSValue::encode(JSC::jsUndefined());
default: {
break;
}
}
throwException(lexicalGlobalObject, scope, createTypeError(lexicalGlobalObject, "ERR_INVALID_ARG_TYPE: expected Buffer or array-like object"_s));
return JSValue::encode(JSC::jsUndefined());
}
JSC::EncodedJSValue KeyObject__Exports(JSC::JSGlobalObject* globalObject, JSC::CallFrame* callFrame)