Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dfahlander committed Mar 15, 2016
1 parent 41806bf commit b68a815
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ let Promise = Dexie.Promise; // KEEP! (*1)
var db = new Dexie("FriendDatabase");
db.version(1).stores({ friends: "++id,name,age" });

async function haveFun () {
db.transaction('rw', db.friends, async() => {

// Make sure we have something in DB:
if ((await db.friends.where('name').equals('Josephine').count()) === 0) {
Expand All @@ -104,9 +104,8 @@ async function haveFun () {

// Show result:
alert ("My young friends: " + JSON.stringify(youngFriends));
}

haveFun().catch(e => {

}).catch(e => {
alert(e);
});

Expand Down Expand Up @@ -141,7 +140,7 @@ class FriendDatabase extends Dexie {

var db = new FriendDatabase();

async function haveFun () {
db.transaction('rw', db.friends, async() => {

// Make sure we have something in DB:
if ((await db.friends.where('name').equals('Josephine').count()) === 0) {
Expand All @@ -154,9 +153,8 @@ async function haveFun () {

// Show result:
alert ("My young friends: " + JSON.stringify(youngFriends));
}

haveFun().catch(e => {

}).catch(e => {
alert(e);
});
```
Expand Down

0 comments on commit b68a815

Please sign in to comment.