[gnome-maps] http: Check property before use in expression
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] http: Check property before use in expression
- Date: Thu, 9 Nov 2017 20:50:25 +0000 (UTC)
commit 48f10781d7e3c89ff3aed734cdfb6a8159588a9d
Author: Marcus Lundblad <ml update uu se>
Date: Tue Nov 7 22:39:49 2017 +0100
http: Check property before use in expression
https://bugzilla.gnome.org/show_bug.cgi?id=782861
src/http.js | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/http.js b/src/http.js
index 2d7a7c4..482e3aa 100644
--- a/src/http.js
+++ b/src/http.js
@@ -42,7 +42,8 @@ var Query = new Lang.Class({
// a value === null represents an empty value
add: function(key, value) {
// Initialize query field if it isn't already
- if(!Array.isArray(this._query[key]))
+ let queryValue = this._query[key];
+ if(!Array.isArray(queryValue))
this._query[key] = [];
if(Array.isArray(value))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]