Commit ab0efc3c authored by Clément's avatar Clément

bugfix: set data-src on [bind-user]

parent 0f877666
......@@ -27,6 +27,12 @@
sib.oidc.getUser(user => {
sib.oidc.user = user;
const id = user.profile.website;
const selector = `[bind-user]:not([data-src="${id}"])`;
const elements = document.querySelectorAll(selector);
for (const element of elements) {
element.setAttribute('data-src', id);
}
});
async function tryToGetUserOrConnect() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment