Explorar o código

refactor: remove redundant ternary (#8848)

Sultan Iman %!s(int64=7) %!d(string=hai) anos
pai
achega
374861f72b
Modificáronse 1 ficheiros con 1 adicións e 3 borrados
  1. 1 3
      src/core/instance/state.js

+ 1 - 3
src/core/instance/state.js

@@ -224,9 +224,7 @@ export function defineComputed (
         ? createComputedGetter(key)
         : userDef.get
       : noop
-    sharedPropertyDefinition.set = userDef.set
-      ? userDef.set
-      : noop
+    sharedPropertyDefinition.set = userDef.set || noop
   }
   if (process.env.NODE_ENV !== 'production' &&
       sharedPropertyDefinition.set === noop) {