mirror of https://github.com/grpc/grpc-node.git
grpc-js: resolve eslint no-prototype-builtins
This commit is contained in:
parent
53f3daa685
commit
490217c059
|
@ -194,7 +194,7 @@ export function loadPackageDefinition(
|
|||
): GrpcObject {
|
||||
const result: GrpcObject = {};
|
||||
for (const serviceFqn in packageDef) {
|
||||
if (packageDef.hasOwnProperty(serviceFqn)) {
|
||||
if (Object.prototype.hasOwnProperty.call(packageDef, serviceFqn)) {
|
||||
const service = packageDef[serviceFqn];
|
||||
const nameComponents = serviceFqn.split('.');
|
||||
const serviceName = nameComponents[nameComponents.length - 1];
|
||||
|
|
|
@ -479,7 +479,7 @@ export class Http2ServerCallStream<
|
|||
}
|
||||
|
||||
if (err) {
|
||||
if (!err.hasOwnProperty('metadata')) {
|
||||
if (!Object.prototype.hasOwnProperty.call(err, 'metadata')) {
|
||||
err.metadata = metadata;
|
||||
}
|
||||
this.sendError(err);
|
||||
|
|
Loading…
Reference in New Issue