diff --git a/src/addon.cpp b/src/addon.cpp index fdfdcd2..ddb5b99 100644 --- a/src/addon.cpp +++ b/src/addon.cpp @@ -156,13 +156,13 @@ void uWS_setInteger(const FunctionCallbackInfo &args) { return; } - NativeString collection(args.GetIsolate(), args[1]); + uint32_t value = Local::Cast(args[1])->Value(); + + NativeString collection(args.GetIsolate(), args[2]); if (collection.isInvalid(args)) { return; } - uint32_t value = Local::Cast(args[1])->Value(); - kvStoreInteger[std::string(collection.getString())][std::string(key.getString())] = value; }