diff options
author | 2023-10-27 02:20:51 -0700 | |
---|---|---|
committer | 2023-10-27 02:20:51 -0700 | |
commit | 700f932ddf612d1f7722d6b293ff82dbfdd96bfd (patch) | |
tree | 2d62a9a83392a62d09b8574a251b1faf2865f47a | |
parent | 7485c7c7cbbb47251f81cbcbcfb24431ad6075b1 (diff) | |
download | bun-700f932ddf612d1f7722d6b293ff82dbfdd96bfd.tar.gz bun-700f932ddf612d1f7722d6b293ff82dbfdd96bfd.tar.zst bun-700f932ddf612d1f7722d6b293ff82dbfdd96bfd.zip |
Fix warning
-rw-r--r-- | src/bun.js/bindings/KeyObject.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/bun.js/bindings/KeyObject.cpp b/src/bun.js/bindings/KeyObject.cpp index d770c67a5..e097c2dfd 100644 --- a/src/bun.js/bindings/KeyObject.cpp +++ b/src/bun.js/bindings/KeyObject.cpp @@ -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) |