diff --git a/src/node_file.cc b/src/node_file.cc index 5bd0237e7b0556..4301cdc7b4e410 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -1130,7 +1130,7 @@ static void FTruncate(const FunctionCallbackInfo& args) { CHECK(args[0]->IsInt32()); const int fd = args[0].As()->Value(); - CHECK(args[1]->IsNumber()); + CHECK(IsSafeJsInt(args[1])); const int64_t len = args[1].As()->Value(); FSReqBase* req_wrap_async = GetReqWrap(env, args[2]);