[gnome-ostree] jsondb: Ensure we return null if we have nothing to return
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-ostree] jsondb: Ensure we return null if we have nothing to return
- Date: Fri, 7 Dec 2012 00:33:47 +0000 (UTC)
commit 59c151112d2aba602e0d4e979b007d6466f5de65
Author: Colin Walters <walters verbum org>
Date: Thu Dec 6 19:32:51 2012 -0500
jsondb: Ensure we return null if we have nothing to return
Fixes an exception.
src/ostbuild/js/jsondb.js | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/ostbuild/js/jsondb.js b/src/ostbuild/js/jsondb.js
index 7628c5a..4bdc386 100644
--- a/src/ostbuild/js/jsondb.js
+++ b/src/ostbuild/js/jsondb.js
@@ -74,7 +74,7 @@ const JsonDB = new Lang.Class({
}
prev = fname;
}
- if (found)
+ if (found && prev)
return this._path.get_child(prev);
return null;
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]