Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Commit

Permalink
fix(): avoid calls with empty translationId (sub issue of #298)
Browse files Browse the repository at this point in the history
  • Loading branch information
knalli committed Jan 20, 2014
1 parent 173a9bc commit 08f087b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/directive/translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ angular.module('pascalprecht.translate')
if (!translateValuesExist && !translateValueExist) {
return function () {
var unwatch = scope.$watch('translationId', function (value) {
if (value) {
if (scope.translationId && value) {
iElement.html(translate(value, {}, translateInterpolation));
unwatch();
}
Expand All @@ -143,7 +143,7 @@ angular.module('pascalprecht.translate')
} else {
return function () {
scope.$watch('interpolateParams', function (value) {
if (value) {
if (scope.translationId && value) {
iElement.html(translate(scope.translationId, value, translateInterpolation));
}
}, true);
Expand Down

0 comments on commit 08f087b

Please sign in to comment.