diff --git a/packages/utils/package.json b/packages/utils/package.json index dc188a5..66849f2 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@holochain-open-dev/utils", - "version": "0.16.3", + "version": "0.16.4", "description": "Common utilities to build Holochain web applications", "author": "guillem.cordoba@gmail.com", "main": "dist/index.js", diff --git a/packages/utils/src/clean-node-decoding.ts b/packages/utils/src/clean-node-decoding.ts index 9559022..d0f9be6 100644 --- a/packages/utils/src/clean-node-decoding.ts +++ b/packages/utils/src/clean-node-decoding.ts @@ -9,7 +9,8 @@ */ export function cleanNodeDecoding(object: any): any { return deepMap(object, (value) => { - if (Buffer.isBuffer(value)) return new Uint8Array(value); + if (typeof Buffer !== "undefined" && Buffer.isBuffer(value)) + return new Uint8Array(value); if (value === null) return undefined; return value; });