Skip to content

Commit 1b65b94

Browse files
committed
Fix issue siddii#180
1 parent f9fa496 commit 1b65b94

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/js/_timer.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ var timerModule = angular.module('timer', [])
3232
$scope.language = $scope.language || 'en';
3333

3434
//allow to change the language of the directive while already launched
35-
$scope.$watch('language', function() {
36-
i18nService.init($scope.language);
35+
$scope.$watch('language', function(newVal, oldVal) {
36+
if(newVal !== undefined) {
37+
i18nService.init(newVal);
38+
}
3739
});
3840

3941
//init momentJS i18n, default english

0 commit comments

Comments
 (0)