From 0d98fe6ef9207020902813d0fe6f67c1109b6eff Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 29 Jun 2018 10:02:02 -0700 Subject: [PATCH] lib: fix segfault with --without-intl Node.js segfaults when build with `--without-intl` due to an oversight in d13cdd9. This fixes the issue. PR-URL: https://github.com/nodejs/node/pull/21589 Reviewed-By: Colin Ihrig Reviewed-By: Gus Caplan Reviewed-By: Benjamin Gruenbaum Reviewed-By: Refael Ackermann Reviewed-By: Luigi Pinca --- lib/internal/per_context.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/per_context.js b/lib/internal/per_context.js index bdbad5344ff..f07e8822296 100644 --- a/lib/internal/per_context.js +++ b/lib/internal/per_context.js @@ -4,7 +4,7 @@ (function(global) { // https://github.com/nodejs/node/issues/14909 - delete global.Intl.v8BreakIterator; + if (global.Intl) delete global.Intl.v8BreakIterator; // https://github.com/nodejs/node/issues/21219 // Adds Atomics.notify and warns on first usage of Atomics.wake