Explorar el Código

refactor: remove redundant ternary (#8848)

Sultan Iman hace 7 años
padre
commit
374861f72b
Se han modificado 1 ficheros con 1 adiciones y 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) {