refactor: use Buffer.from and Buffer.alloc instead of new Buffer() (#957)
This commit is contained in:
committed by
László Monda
parent
999feea488
commit
82c9126d82
@@ -209,7 +209,7 @@ export class UserConfigEffects {
|
||||
if (info.filename.endsWith('.bin')) {
|
||||
userConfig.fromBinary(UhkBuffer.fromArray(info.data));
|
||||
} else {
|
||||
const buffer = new Buffer(info.data);
|
||||
const buffer = Buffer.from(info.data);
|
||||
const json = buffer.toString();
|
||||
userConfig.fromJsonObject(JSON.parse(json));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user