Skip to content

Commit 7496e8e

Browse files
refactor(*): combine sequence of .push() into one statement
Closes angular#10192
1 parent e9b9421 commit 7496e8e

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

src/ng/compile.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -2227,10 +2227,10 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
22272227
var childBoundTranscludeFn = boundTranscludeFn;
22282228
if (scope.$$destroyed) return;
22292229
if (linkQueue) {
2230-
linkQueue.push(scope);
2231-
linkQueue.push(node);
2232-
linkQueue.push(rootElement);
2233-
linkQueue.push(childBoundTranscludeFn);
2230+
linkQueue.push(scope,
2231+
node,
2232+
rootElement,
2233+
childBoundTranscludeFn);
22342234
} else {
22352235
if (afterTemplateNodeLinkFn.transcludeOnThisElement) {
22362236
childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn);

src/ng/filter/filters.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,9 @@ function formatNumber(number, pattern, groupSep, decimalSep, fractionSize) {
213213
}
214214
}
215215

216-
parts.push(isNegative ? pattern.negPre : pattern.posPre);
217-
parts.push(formatedText);
218-
parts.push(isNegative ? pattern.negSuf : pattern.posSuf);
216+
parts.push(isNegative ? pattern.negPre : pattern.posPre,
217+
formatedText,
218+
isNegative ? pattern.negSuf : pattern.posSuf);
219219
return parts.join('');
220220
}
221221

src/ngSanitize/filter/linky.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,13 @@ angular.module('ngSanitize').filter('linky', ['$sanitize', function($sanitize) {
137137
function addLink(url, text) {
138138
html.push('<a ');
139139
if (angular.isDefined(target)) {
140-
html.push('target="');
141-
html.push(target);
142-
html.push('" ');
140+
html.push('target="',
141+
target,
142+
'" ');
143143
}
144-
html.push('href="');
145-
html.push(url);
146-
html.push('">');
144+
html.push('href="',
145+
url,
146+
'">');
147147
addText(text);
148148
html.push('</a>');
149149
}

0 commit comments

Comments
 (0)