Commit 1c530e89 authored by Vse Mozhet Byt's avatar Vse Mozhet Byt
Browse files

tools: dedupe property access in doc/type-parser

There is no need to get this property twice in this rather hot spot:
if there is no such key, the `typeUrl` will be `undefined`,
which suffices for the boolean check in the next line.

For consistency, `undefined` can also be made the default value.

PR-URL: https://github.com/nodejs/node/pull/20387


Reviewed-By: default avatarTobias Nießen <tniessen@tnie.de>
Reviewed-By: default avatarTrivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: default avatarRuben Bridgewater <ruben@bridgewater.de>
parent 64a37654
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment