Skip to content
Snippets Groups Projects
Commit 677b9bbb authored by Guillaume Delhumeau's avatar Guillaume Delhumeau
Browse files

XWIKI-13772: A warning is displayed on the log when a Flamingo Theme is being edited.

parent 044ec6f9
No related tags found
No related merge requests found
......@@ -422,7 +422,12 @@
// We run LESS in a thread in order to not block the main thread
setTimeout(function(){
// Run LESS (which use promises)
iframe[0].contentWindow.lessJs.modifyVars(varMap).then(removeCurtain).catch(removeCurtain);
// Note: because of yuicompressor which does not support Promise.prototype.catch() properly, we cannot
// call p.catch() directly (it generates an error in the logs).
// See http://jira.xwiki.org/browse/XWIKI-13772
// Instead, we use the following trick: p['catch']()
// TODO: remove this trick when we replace yuicompressor by something else.
iframe[0].contentWindow.lessJs.modifyVars(varMap).then(removeCurtain)['catch'](removeCurtain);
}, 10);
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment