Browse Source

an if/else with two returns is not necessary

tim-kos 9 years ago
parent
commit
f02c7e3069
1 changed files with 2 additions and 2 deletions
  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) {
       var plural = this.opts.locale.pluralize(options.smart_count);
       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);
   }
 
 }