Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions src/io/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ p5.prototype.loadJSON = function () {
* function preload() {
* result = loadStrings('assets/test.txt');
* }

* function setup() {
* background(200);
* var ind = floor(random(result.length));
Expand Down Expand Up @@ -466,9 +465,9 @@ p5.prototype.loadTable = function (path) {
var sep = ',';
var separatorSet = false;
var decrementPreload = p5._getDecrementPreload.apply(this, arguments);
if(ext === 'tsv'){ //Only need to check if extension is tsv because csv is default
sep = '\t';

if(ext === 'tsv'){//Only need to check if extension is tsv because csv is default
sep = '\t';
}

for (var i = 1; i < arguments.length; i++) {
Expand Down Expand Up @@ -858,7 +857,7 @@ p5.prototype.httpDo = function () {
type = 'text';
}
}
}else{
} else {
// Provided with arguments
var path = arguments[0];
var method = 'GET';
Expand All @@ -871,15 +870,15 @@ p5.prototype.httpDo = function () {
method = a;
} else if(a === 'json' || a === 'jsonp' || a === 'xml' || a === 'text') {
type = a;
} else {
data = a;
} else if(typeof a === 'number') {
data = a.toString();
}
} else if (typeof a === 'object') {
if(a.hasOwnProperty('jsonpCallback')){
if(a.hasOwnProperty('jsonpCallback')) {
for (var attr in a) {
jsonpOptions[attr] = a[attr];
}
}else{
} else {
data = JSON.stringify(a);
contentType = 'application/json';
}
Expand Down