mirror of
https://github.com/siemens-mobile-hacks/node-serialport-bindings-cpp.git
synced 2026-11-25 18:37:19 +00:00
chore: Avoid using deprecated Buffer constructor (#1510)
safe-buffer is already used and provides Buffer.alloc polyfill, so just use Buffer.alloc directly to avoid hitting deprecated API. Refs: https://nodejs.org/api/deprecations.html#deprecations_dep0005_buffer_constructor
This commit is contained in:
parent
45b3a2feb5
commit
0c1533b825
1 changed files with 1 additions and 1 deletions
|
|
@ -17,7 +17,7 @@ class MockBinding extends BaseBinding {
|
|||
this.isOpen = false;
|
||||
this.port = null;
|
||||
this.lastWrite = null;
|
||||
this.recording = new Buffer(0);
|
||||
this.recording = Buffer.alloc(0);
|
||||
this.writeOperation = null; // in flight promise or null
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue