Apply no-buffer-constructor lint rule
This commit is contained in:
1 parent
d85afcd2b5
commit
b43088c03c
6 files changed
+8
-7
No files matched your search
+2
-2
@@ -524,7 +524,7 @@ function response(rpc) {
|
||||
SOAPServer: SERVER_NAME
|
||||
};
|
||||
|
||||
if (!rpc) return { code: 204, headers: headers, data: new Buffer(0) };
|
||||
if (!rpc) return { code: 204, headers: headers, data: Buffer.allocUnsafe(0) };
|
||||
|
||||
const env = createSoapEnv(rpc.cwmpVersion);
|
||||
const header = env.node("soap-env:Header");
|
||||
@@ -589,7 +589,7 @@ function response(rpc) {
|
||||
return {
|
||||
code: 200,
|
||||
headers: headers,
|
||||
data: new Buffer(env.doc().toString(LIBXMLJS_SAVE_OPTIONS))
|
||||
data: env.doc().toString(LIBXMLJS_SAVE_OPTIONS)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user