Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
a219b0bc
Commit
a219b0bc
authored
Jan 28, 2020
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better IndexedDB error handling
parent
be632b36
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
tests/mock.js
tests/mock.js
+8
-4
No files found.
tests/mock.js
View file @
a219b0bc
...
...
@@ -231,13 +231,15 @@
try
{
store
=
db
.
transaction
([
bare_jid
],
"
readwrite
"
).
objectStore
(
bare_jid
);
}
catch
(
e
)
{
console
.
error
(
e
);
return
promise
.
resolve
();
}
const
request
=
store
.
clear
();
request
.
onsuccess
=
promise
.
resolve
();
request
.
onerror
=
promise
.
resolve
();
};
db_request
.
onerror
=
function
(
ev
)
{
return
promise
.
reject
(
ev
.
target
.
error
);
}
return
promise
;
}
...
...
@@ -313,9 +315,10 @@
}
return
async
done
=>
{
const
_converse
=
await
initConverse
(
settings
);
let
_converse
;
async
function
_done
()
{
if
(
_converse
.
api
.
connection
.
connected
())
{
if
(
_converse
&&
_converse
.
api
.
connection
.
connected
())
{
await
_converse
.
api
.
user
.
logout
();
}
const
el
=
document
.
querySelector
(
'
#conversejs
'
);
...
...
@@ -325,8 +328,9 @@
document
.
title
=
"
Converse Tests
"
;
done
();
}
await
Promise
.
all
((
promise_names
||
[]).
map
(
_converse
.
api
.
waitUntil
));
try
{
_converse
=
await
initConverse
(
settings
);
await
Promise
.
all
((
promise_names
||
[]).
map
(
_converse
.
api
.
waitUntil
));
await
func
(
_done
,
_converse
);
}
catch
(
e
)
{
console
.
error
(
e
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment