[gnome-documents] Fix some uninitialized variables runtime warnings
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] Fix some uninitialized variables runtime warnings
- Date: Fri, 19 Apr 2013 14:48:06 +0000 (UTC)
commit fb2177f5408e03d651635980b0c89ff0c6420902
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Fri Apr 19 10:47:23 2013 -0400
Fix some uninitialized variables runtime warnings
src/manager.js | 5 +++--
src/search.js | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/manager.js b/src/manager.js
index 57267a2..41e136c 100644
--- a/src/manager.js
+++ b/src/manager.js
@@ -137,7 +137,7 @@ const BaseManager = new Lang.Class({
},
forEachItem: function(func) {
- for (idx in this._items)
+ for (let idx in this._items)
func(this._items[idx]);
},
@@ -154,6 +154,7 @@ const BaseManager = new Lang.Class({
processNewItems: function(newItems) {
let oldItems = this.getItems();
+ let idx;
for (idx in oldItems) {
let item = oldItems[idx];
@@ -213,7 +214,7 @@ const BaseModel = new Lang.Class({
}
let items = this._manager.getItems();
- for (idx in items) {
+ for (let idx in items) {
let item = items[idx];
iter = this.model.append();
this.model.set(iter,
diff --git a/src/search.js b/src/search.js
index c9c2193..a122c8b 100644
--- a/src/search.js
+++ b/src/search.js
@@ -449,7 +449,7 @@ const SourceManager = new Lang.Class({
let sources = this.getItems();
let filters = [];
- for (idx in sources) {
+ for (let idx in sources) {
let source = sources[idx];
if (!source.builtin)
filters.push(source.getFilter());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]