Fix setInteger

This commit is contained in:
Alex Hultman 2020-08-11 21:30:41 +02:00 committed by GitHub
parent 83e38ba334
commit 0e63c77bd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -156,13 +156,13 @@ void uWS_setInteger(const FunctionCallbackInfo<Value> &args) {
return; return;
} }
NativeString collection(args.GetIsolate(), args[1]); uint32_t value = Local<Integer>::Cast(args[1])->Value();
NativeString collection(args.GetIsolate(), args[2]);
if (collection.isInvalid(args)) { if (collection.isInvalid(args)) {
return; return;
} }
uint32_t value = Local<Integer>::Cast(args[1])->Value();
kvStoreInteger[std::string(collection.getString())][std::string(key.getString())] = value; kvStoreInteger[std::string(collection.getString())][std::string(key.getString())] = value;
} }