Commit 9c2d33f6 authored by Matthieu Fesselier's avatar Matthieu Fesselier

bugfix: refresh only if unread

parent 4c9e104c
Pipeline #6076 passed with stage
in 1 minute and 32 seconds
......@@ -3,7 +3,7 @@ import Favico from 'https://dev.jspm.io/favico.js-slevomat';
// Dev Mode
// const base_url = import.meta.url.replace(/\/[^\/]*$/, '');
const base_url = "https://unpkg.com/@startinblox/component-notifications@0.2";
const base_url = "https://unpkg.com/@startinblox/component-notifications@0.3";
Helpers.importCSS(`${base_url}/css/notification.css`);
Helpers.importJS('https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js');
......@@ -102,9 +102,11 @@ class SIBNotifications extends SIBTemplateElement {
}
}
Promise.all(promises)
if (promises.length) {
Promise.all(promises)
.then(() => this.refresh())
.catch((error) => this._printError(error));
}
}
async _onClickNotification(target) {
......
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