From e2b08f0ea8673642530ebd93c94181e5190e42f7 Mon Sep 17 00:00:00 2001 From: himself65 Date: Mon, 16 Mar 2020 00:08:53 +0800 Subject: [PATCH] src: remove unnecessary 'Local.As' operation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/32286 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Gus Caplan Reviewed-By: David Carlier Reviewed-By: Tobias Nießen Reviewed-By: James M Snell --- src/node_env_var.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_env_var.cc b/src/node_env_var.cc index 208bb6981c2dc8..5f543a5e76a1f9 100644 --- a/src/node_env_var.cc +++ b/src/node_env_var.cc @@ -286,7 +286,7 @@ Maybe KVStore::AssignFromObject(Local context, Local value; Local value_string; - if (!entries->Get(context, key.As()).ToLocal(&value) || + if (!entries->Get(context, key).ToLocal(&value) || !value->ToString(context).ToLocal(&value_string)) { return Nothing(); }