From 5046ff75f4ea31d680c3e20a1b30c5dd310e4320 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 19 Dec 2019 23:13:14 -0800 Subject: [PATCH] [Fix] `Symbol.for` is a syntax error in older browsers For example, Opera 10.6. Introduced when fixing #241. --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 19b0468..115e464 100644 --- a/index.js +++ b/index.js @@ -11,8 +11,8 @@ var base64 = require('base64-js') var ieee754 = require('ieee754') var customInspectSymbol = - (typeof Symbol === 'function' && typeof Symbol.for === 'function') - ? Symbol.for('nodejs.util.inspect.custom') + (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') + ? Symbol['for']('nodejs.util.inspect.custom') : null exports.Buffer = Buffer -- 2.34.1