File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -466,17 +466,17 @@ p5.prototype.loadTable = function (path) {
466466 var sep = ',' ;
467467 var separatorSet = false ;
468468 var decrementPreload = p5 . _getDecrementPreload . apply ( this , arguments ) ;
469-
470- if ( ext === 'tsv' ) { //Only need to check if extension is tsv because csv is default
471- sep = '\t' ;
469+
470+ if ( ext === 'tsv' ) { //Only need to check extension is tsv because csv is default
471+ sep = '\t' ;
472472 }
473473
474474 for ( var i = 1 ; i < arguments . length ; i ++ ) {
475475 if ( ( typeof ( arguments [ i ] ) === 'function' ) &&
476476 ( arguments [ i ] !== decrementPreload ) ) {
477477 if ( ! callback ) {
478478 callback = arguments [ i ] ;
479- } else {
479+ } else {
480480 errorCallback = arguments [ i ] ;
481481 }
482482 } else if ( typeof ( arguments [ i ] ) === 'string' ) {
@@ -858,7 +858,7 @@ p5.prototype.httpDo = function () {
858858 type = 'text' ;
859859 }
860860 }
861- } else {
861+ } else {
862862 // Provided with arguments
863863 var path = arguments [ 0 ] ;
864864 var method = 'GET' ;
@@ -874,6 +874,8 @@ p5.prototype.httpDo = function () {
874874 } else {
875875 data = a ;
876876 }
877+ } else if ( typeof a === 'number' ) {
878+ data = a . toString ( ) ;
877879 } else if ( typeof a === 'object' ) {
878880 if ( a . hasOwnProperty ( 'jsonpCallback' ) ) {
879881 for ( var attr in a ) {
You can’t perform that action at this time.
0 commit comments