fixes regression in my: refactor(Storage) PR.

StorageSql engine's get() method must not return the item but the value of the item.
This commit is contained in:
Manu Mtz.-Almeida
2016-03-15 17:03:04 +01:00
parent 75c71a39c7
commit d45ad29220

View File

@ -120,7 +120,7 @@ export class SqlStorage extends StorageEngine {
get(key: string): Promise<any> {
return this.query('select key, value from kv where key = ? limit 1', [key]).then(data => {
if (data.res.rows.length > 0) {
return data.res.rows.item(0);
return data.res.rows.item(0).value;
}
});
}