mirror of
https://github.com/amark/gun.git
synced 2025-06-06 14:16:44 +00:00
SafeBuffer constructor fix for new pattern usage
This commit is contained in:
parent
9b4c6089af
commit
07af08c699
2
sea.js
2
sea.js
@ -80,7 +80,7 @@
|
||||
class SafeBuffer extends SeaArray {
|
||||
constructor(...props) {
|
||||
console.warn('new SafeBuffer() is depreciated, please use SafeBuffer.from()')
|
||||
from = SafeBuffer.from
|
||||
this.from = SafeBuffer.from
|
||||
return SafeBuffer.from(...props)
|
||||
}
|
||||
// (data, enc) where typeof data === 'string' then enc === 'utf8'|'hex'|'base64'
|
||||
|
Loading…
x
Reference in New Issue
Block a user