Closed noway closed 2 years ago
Hi! š
Firstly, thanks for your work on this project! š
Today I used patch-package to patch cbor@8.1.0 for the project I'm working on.
cbor@8.1.0
Fixes #164
Here is the diff that solved my problem:
diff --git a/node_modules/cbor/lib/encoder.js b/node_modules/cbor/lib/encoder.js index 6327959..288c692 100644 --- a/node_modules/cbor/lib/encoder.js +++ b/node_modules/cbor/lib/encoder.js @@ -509,6 +509,9 @@ Call removeLoopDetectors before resuming.`) if (typeof f === 'function') { return f.call(obj, this) } + if (Buffer.isBuffer(obj)) { + return this.semanticTypes[Buffer.name].call(obj, this, obj) + } const converter = this.semanticTypes[obj.constructor.name] if (converter) { return converter.call(obj, this, obj)
This issue body was partially generated by patch-package.
Sorry, thought this going to open a PR, opened a proper PR instead in #166
Hi! š
Firstly, thanks for your work on this project! š
Today I used patch-package to patch
cbor@8.1.0
for the project I'm working on.Fixes #164
Here is the diff that solved my problem:
This issue body was partially generated by patch-package.