vgapp 0.4.6 → 0.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -102,10 +102,18 @@ const Ajax = {
102
102
 
103
103
  if (!isEmptyObj(data)) {
104
104
  for (let key in data) {
105
- query.push(encodeURIComponent(key[0]) + '=' + encodeURIComponent(key[1]));
105
+ console.log(key)
106
+ query.push(encodeURIComponent(key) + '=' + encodeURIComponent(data[key]));
106
107
  }
107
108
  }
108
- Ajax.send(url + (query.length ? '?' + query.join('&') : ''), callback, 'GET', null, async)
109
+
110
+ let uri = '';
111
+ if (query.length) {
112
+ uri += url.includes('?') ? '&' : '?';
113
+ uri += query.join('&');
114
+ }
115
+
116
+ Ajax.send(url + uri, callback, 'GET', null, async)
109
117
  },
110
118
 
111
119
  post: function (url, data, callback, async) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vgapp",
3
- "version": "0.4.6",
3
+ "version": "0.4.7",
4
4
  "description": "",
5
5
  "author": {
6
6
  "name": "Vegas Studio",