Commit d9f21c07 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

apparently only list of ZipEntries should be treaed differently

parent de16d6ca
......@@ -42,7 +42,7 @@ var GuiConnector = require('./GuiConnector');
var ObjectWithListeners = require('./ObjectWithListeners');
var Point = require('./map/canvas/Point');
var Functions = require('./Functions');
var ZipEntry = require('./gui/admin/ZipEntry');
/**
* This object contains methods that will communicate with server.
......@@ -294,10 +294,11 @@ ServerConnector.objectToRequestString = function (object) {
if (object instanceof Point) {
value = this.pointToString(object);
} else if (Object.prototype.toString.call(object) === '[object Array]') {
if (Functions.isInt(object[0])) {
value = this.idsToString(object);
} else {
var arrayObject = object[0];
if (arrayObject instanceof ZipEntry) {
value = object;
} else {
value = this.idsToString(object);
}
} else if (typeof object === 'string' || object instanceof String || !isNaN(object)) {
value = object.toString();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment