Przeglądaj źródła

refactor: remove redundant ternary (#8848)

Sultan Iman 7 lat temu
rodzic
commit
374861f72b
1 zmienionych plików z 1 dodań i 3 usunięć
  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) {