From 9db5e05db73f3cd27ecaeb1a6c9a4ec9085a6d79 Mon Sep 17 00:00:00 2001 From: sollabeck Date: Fri, 10 Mar 2017 15:44:06 -0800 Subject: [PATCH 1/2] change response --- www/SQLitePlugin.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/www/SQLitePlugin.js b/www/SQLitePlugin.js index 482bc84a..4f1cea76 100644 --- a/www/SQLitePlugin.js +++ b/www/SQLitePlugin.js @@ -367,16 +367,12 @@ }; SQLitePluginTransaction.prototype.handleStatementSuccess = function(handler, response) { - var payload, rows; + var payload; if (!handler) { return; } - rows = response.rows || []; payload = { - rows: { - item: function(i) { - return rows[i]; - }, + rows: response.rows || [], length: rows.length }, rowsAffected: response.rowsAffected || 0, From f791592d64286cbfd3004252c93a1f95981ba275 Mon Sep 17 00:00:00 2001 From: sollabeck Date: Fri, 10 Mar 2017 16:09:41 -0800 Subject: [PATCH 2/2] fix typo --- www/SQLitePlugin.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/www/SQLitePlugin.js b/www/SQLitePlugin.js index 4f1cea76..8ab54564 100644 --- a/www/SQLitePlugin.js +++ b/www/SQLitePlugin.js @@ -372,9 +372,7 @@ return; } payload = { - rows: response.rows || [], - length: rows.length - }, + rows: response.rows || [], rowsAffected: response.rowsAffected || 0, insertId: response.insertId || void 0 };