From b5b8ff117c8581945d0c8c3a4b18d53f4b33b86f Mon Sep 17 00:00:00 2001 From: Roman Reiss Date: Fri, 29 May 2015 19:35:43 +0200 Subject: lib: don't use global Buffer Port of https://github.com/joyent/node/pull/8603 The race condition present in the original PR didn't occur, so no workaround was needed. PR-URL: https://github.com/nodejs/io.js/pull/1794 Reviewed-By: Trevor Norris --- lib/string_decoder.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/string_decoder.js') diff --git a/lib/string_decoder.js b/lib/string_decoder.js index 62ea38e08f..0c9fdfb416 100644 --- a/lib/string_decoder.js +++ b/lib/string_decoder.js @@ -1,5 +1,7 @@ 'use strict'; +const Buffer = require('buffer').Buffer; + function assertEncoding(encoding) { // Do not cache `Buffer.isEncoding`, some modules monkey-patch it to support // additional encodings -- cgit v1.2.3