Bläddra i källkod

an if/else with two returns is not necessary

tim-kos 9 år sedan
förälder
incheckning
f02c7e3069
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      src/core/Translator.js

+ 2 - 2
src/core/Translator.js

@@ -58,9 +58,9 @@ export default class Translator {
     if (options.smart_count) {
     if (options.smart_count) {
       var plural = this.opts.locale.pluralize(options.smart_count);
       var plural = this.opts.locale.pluralize(options.smart_count);
       return this.interpolate(this.opts.locale.strings[key][plural], options);
       return this.interpolate(this.opts.locale.strings[key][plural], options);
-    } else {
-      return this.interpolate(this.opts.locale.strings[key], options);
     }
     }
+
+    return this.interpolate(this.opts.locale.strings[key], options);
   }
   }
 
 
 }
 }