Commit 876a676d authored by Romain Courteaud's avatar Romain Courteaud

erp5_web_js_style: add compatibility with google cache

parent 5b9481ed
Pipeline #16499 failed with stage
in 0 seconds
...@@ -339,6 +339,11 @@ ...@@ -339,6 +339,11 @@
}); });
}, function (error) { }, function (error) {
console.warn('Cant load the style gadget', error); console.warn('Cant load the style gadget', error);
if (style_css_url === null) {
// Compatibility with old html format (like in google cache)
gadget.element.innerHTML = parsed_content.original_content;
return;
}
return new RSVP.Queue(rJS.declareCSS(style_css_url, document.head)) return new RSVP.Queue(rJS.declareCSS(style_css_url, document.head))
.push(function () { .push(function () {
// Set again the page content after the css is loaded // Set again the page content after the css is loaded
......
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