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

Commit

Permalink
fix(directive): fix minor memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
knalli committed Dec 11, 2014
1 parent b97627e commit 5e4533a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/directive/translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ angular.module('pascalprecht.translate')
scope.preText = interpolateMatches[1];
scope.postText = interpolateMatches[3];
translationIds.translate = $interpolate(interpolateMatches[2])(scope.$parent);
watcherMatches = iElement.text().match(watcherRegExp);
var watcherMatches = iElement.text().match(watcherRegExp);
if (angular.isArray(watcherMatches) && watcherMatches[2] && watcherMatches[2].length) {
scope.$watch(watcherMatches[2], function (newValue) {
translationIds.translate = newValue;
Expand Down

0 comments on commit 5e4533a

Please sign in to comment.