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

Commit

Permalink
fix(translateDirective): fixes bad coding convention
Browse files Browse the repository at this point in the history
  • Loading branch information
0x-r4bbit committed Dec 17, 2013
1 parent 908496a commit d5db4ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/directive/translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,11 @@ angular.module('pascalprecht.translate')

attr.$observe('translateValues', function (interpolateParams) {
// Only watch parent scope if there is data to retreive from it
if (interpolateParams)
if (interpolateParams) {
scope.$parent.$watch(function() {
scope.interpolateParams = $parse(interpolateParams)(scope.$parent);
});
}
});

// Ensures the text will be refreshed after the current language was changed
Expand Down

2 comments on commit d5db4ad

@knalli
Copy link
Member

@knalli knalli commented on d5db4ad Dec 17, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Phew, actually, the linters are so chatty.. ;)

@tspaeth
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:-)

Please sign in to comment.