From 6da1c5fe861d3d6d6defdde9dd89c70d93724bd4 Mon Sep 17 00:00:00 2001 From: Irena Shaigorodsky Date: Wed, 4 Mar 2015 16:53:30 -0500 Subject: [PATCH] Fixing translation piece --- src/localize.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/localize.js b/src/localize.js index ffa2f84..c795117 100644 --- a/src/localize.js +++ b/src/localize.js @@ -110,7 +110,7 @@ angular.module('localization', []) var result = ''; // make sure the dictionary has valid data - if (localize.resourceFileLoaded) { + if ((localize.dictionary !== []) && (localize.dictionary.length > 0)) { // use the filter service to only return those entries which match the value // and only take the first result var entry = $filter('filter')(localize.dictionary, function(element) { @@ -118,7 +118,7 @@ angular.module('localization', []) } ); // set the result - result = entry[value] ? entry[value] : value; + result = entry[0] ? entry[0].value : value; } // return the value to the call return result;