From f2afcad58231e478f2e7912267f4b0154e847cbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Thu, 28 Jul 2022 08:12:54 +0000 Subject: [PATCH] src: fix bug in GetErrorSource() Refs: https://github.com/nodejs/node/pull/43875 PR-URL: https://github.com/nodejs/node/pull/44019 Reviewed-By: Ben Noordhuis Reviewed-By: Richard Lau Reviewed-By: Chengzhong Wu Reviewed-By: Feng Yu --- src/node_errors.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_errors.cc b/src/node_errors.cc index d529cf8b6c69d0..63c6ea09d59152 100644 --- a/src/node_errors.cc +++ b/src/node_errors.cc @@ -105,7 +105,7 @@ static std::string GetErrorSource(Isolate* isolate, if (has_source_map_url && env != nullptr && env->source_maps_enabled()) { std::string source = GetSourceMapErrorSource( isolate, context, message, added_exception_line); - return added_exception_line ? source : sourceline; + return *added_exception_line ? source : sourceline; } // Because of how node modules work, all scripts are wrapped with a