Skip to content

Commit f19b447

Browse files
committed
example: enable buttons even when expiry is null
1 parent 6504dce commit f19b447

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

example/index.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,11 @@
168168
let expiry = window[namespace].wasmClientGetExpiry();
169169
if (!expiry) {
170170
document.getElementById('expiry').innerHTML = "No expiry found in macaroon";
171-
return {}
171+
} else {
172+
localStorage.setItem(namespace+":expiry", expiry)
173+
document.getElementById('expiry').innerHTML = "Session Expiry: "+new Date(expiry*1000).toLocaleString();
172174
}
173175

174-
localStorage.setItem(namespace+":expiry", expiry)
175-
document.getElementById('expiry').innerHTML = "Session Expiry: "+new Date(expiry*1000).toLocaleString();
176-
177176
// Determine if the session is a read only session.
178177
let readOnly = window[namespace].wasmClientIsReadOnly();
179178
if (readOnly) {

0 commit comments

Comments
 (0)