File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
tools/spectral/ipa/rulesets/functions/utils Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -19,10 +19,7 @@ return keys.contains(VERB_OVERRIDE_EXTENSION)
1919 * @returns {boolean } true if the object has an extension with customMethod=True, otherwise false
2020 */
2121export function hasCustomMethodOverride ( object ) {
22- if ( hasVerbOverride ( object ) ) {
23- return object [ VERB_OVERRIDE_EXTENSION ] . customMethod ;
24- }
25- return false ;
22+ return hasVerbOverride ( object ) ) && object [ VERB_OVERRIDE_EXTENSION ] . customMethod ;
2623}
2724
2825/**
@@ -32,12 +29,7 @@ export function hasCustomMethodOverride(object) {
3229 * @param verb the verb to inspect the extension for
3330 * @returns {boolean } true if the object has the extension with the given verb, otherwise false
3431 */
35- export function hasMethodVerbOverride ( object , verb ) {
36- if ( hasVerbOverride ( object ) ) {
37- return object [ VERB_OVERRIDE_EXTENSION ] . verb === verb ;
38- }
39- return false ;
40- }
32+ return hasVerbOverride ( object ) && object [ VERB_OVERRIDE_EXTENSION ] . verb === verb
4133
4234/**
4335 * Checks if the object has an extension "x-xgen-method-verb-override"
You can’t perform that action at this time.
0 commit comments