1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-07-25 03:58:30 +00:00

Log errors in metadata so we can get more useful information for debugging.

This commit is contained in:
SirStendec 2018-04-08 14:59:34 -04:00
parent 7a01f5d79e
commit 8c5b6910ed
2 changed files with 5 additions and 0 deletions

View file

@ -340,6 +340,7 @@ export default class Metadata extends Module {
const parent = document.body.querySelector('.twilight-root') || document.body, const parent = document.body.querySelector('.twilight-root') || document.body,
tt = el._ffz_popup = new Tooltip(parent, el, { tt = el._ffz_popup = new Tooltip(parent, el, {
logger: this.log,
manual: true, manual: true,
html: true, html: true,
@ -394,6 +395,7 @@ export default class Metadata extends Module {
if ( def.tooltip ) { if ( def.tooltip ) {
const parent = document.body.querySelector('.twilight-root') || document.body; const parent = document.body.querySelector('.twilight-root') || document.body;
el.tooltip = new Tooltip(container, el, { el.tooltip = new Tooltip(container, el, {
logger: this.log,
live: false, live: false,
html: true, html: true,
content: () => el.tip_content, content: () => el.tip_content,

View file

@ -280,6 +280,9 @@ export class Tooltip {
tip._update(); tip._update();
}).catch(err => { }).catch(err => {
if ( this.options.logger )
this.options.logger.error('Error rendering tooltip content.', err);
inner.textContent = `There was an error showing this tooltip.\n${err}`; inner.textContent = `There was an error showing this tooltip.\n${err}`;
tip._update(); tip._update();
}); });