You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
driftyco/ionic2#770 which referenced #393 was fixed as follows in Ionic2 Typescript:
--- a/ionic/platform/storage/sql.ts+++ b/ionic/platform/storage/sql.ts@@ -96,7 +96,7 @@ export class SqlStorage extends StorageEngine {
* @param {array} params the additional params to use for query placeholders
* @return {Promise} that resolves or rejects with an object of the form { tx: Transaction, res: Result (or err)}
*/
- query(query, ...params) {+ query(query, params=[]) {
return new Promise((resolve, reject) => {
try {
this._db.transaction((tx) => {
Looks like the underlying implementation is really sensitive about the number of arguments in the params array, and using ...params created an array with one undefined item: [undefined] when it should have been empty.
The plugin should handle this case by either treating it as an empty parameters array, i.e. [], or throwing an exception, and the behavior should be the same for all target platforms. I will add a test for this when I get a chance.
The text was updated successfully, but these errors were encountered:
driftyco/ionic2#770 which referenced #393 was fixed as follows in Ionic2 Typescript:
According to https://github.com/driftyco/ionic2/issues/770#issuecomment-165568393:
The plugin should handle this case by either treating it as an empty parameters array, i.e.
[]
, or throwing an exception, and the behavior should be the same for all target platforms. I will add a test for this when I get a chance.The text was updated successfully, but these errors were encountered: