From da1905b78985c4e5c32e349980c143011e67f4e8 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sat, 20 Aug 2016 17:08:24 +0100 Subject: [PATCH] Revise default for `Buffer` in the browser Back in 7d12d89a0afda3ff5383b4c64e7408485dd959bc we added support for Node.js global `Buffer` object, explicitly exposing it to the module loader sandbox. The value `{}` was used in the browser, but is now causing problems with libraries that perform feature detection. --- boot/boot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot/boot.js b/boot/boot.js index 2ca27e749..27b65694c 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -648,7 +648,7 @@ $tw.modules.execute = function(moduleName,moduleRoot) { clearInterval: clearInterval, setTimeout: setTimeout, clearTimeout: clearTimeout, - Buffer: $tw.browser ? {} : Buffer, + Buffer: $tw.browser ? undefined : Buffer, $tw: $tw, require: function(title) { return $tw.modules.execute(title, name);