Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1219)

Unified Diff: ui/webui/resources/js/i18n_template_no_process.js

Issue 1246633007: Check that processed i18n nodes are defined before marking them. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/webui/resources/js/i18n_template_no_process.js
diff --git a/ui/webui/resources/js/i18n_template_no_process.js b/ui/webui/resources/js/i18n_template_no_process.js
index e3bc9131928b65fff708f604121e3f79d7bb4550..38443f01b5bf868d9d9850503ed97576732a713e 100644
--- a/ui/webui/resources/js/i18n_template_no_process.js
+++ b/ui/webui/resources/js/i18n_template_no_process.js
@@ -184,8 +184,10 @@ var i18nTemplate = (function() {
if (mark) {
var processed = isElement ? [root] : root.children;
Dan Beam 2015/07/22 00:20:40 fwiw: this would probably work on iOS as well v
- for (var i = 0; i < processed.length; ++i) {
- processed[i].setAttribute('i18n-processed', '');
+ if (processed) {
Dan Beam 2015/07/21 21:26:21 I'm confused. if ([]) always triggers. root.child
+ for (var i = 0; i < processed.length; ++i) {
+ processed[i].setAttribute('i18n-processed', '');
+ }
}
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698