Commit d754ce80 authored by Romain Courteaud's avatar Romain Courteaud

erp5_xhtml_style/erp5_web_renderjs_ui: renderjs 0.24.0

parent fddb6ade
...@@ -745,6 +745,27 @@ if (typeof document.contains !== 'function') { ...@@ -745,6 +745,27 @@ if (typeof document.contains !== 'function') {
Event, URL) { Event, URL) {
"use strict"; "use strict";
// Error propagation in jschannel uses JSON.stringify
// Sadly, ...
// JSON.stringify(new TypeError('lala')) -> '{}'
// Change the browser default behaviour to propagate at least the message
// See https://stackoverflow.com/a/18391400
if (!Error.prototype.hasOwnProperty('toJSON')) {
Object.defineProperty(Error.prototype, 'toJSON', {
value: function () {
var alt = {};
Object.getOwnPropertyNames(this).forEach(function (key) {
alt[key] = this[key];
}, this);
return alt;
},
configurable: true,
writable: true
});
}
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// Error // Error
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>982.39920.30457.43434</string> </value> <value> <string>982.46775.50354.51694</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1584544790.23</float> <float>1588580432.81</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -745,6 +745,27 @@ if (typeof document.contains !== 'function') { ...@@ -745,6 +745,27 @@ if (typeof document.contains !== 'function') {
Event, URL) { Event, URL) {
"use strict"; "use strict";
// Error propagation in jschannel uses JSON.stringify
// Sadly, ...
// JSON.stringify(new TypeError('lala')) -> '{}'
// Change the browser default behaviour to propagate at least the message
// See https://stackoverflow.com/a/18391400
if (!Error.prototype.hasOwnProperty('toJSON')) {
Object.defineProperty(Error.prototype, 'toJSON', {
value: function () {
var alt = {};
Object.getOwnPropertyNames(this).forEach(function (key) {
alt[key] = this[key];
}, this);
return alt;
},
configurable: true,
writable: true
});
}
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// Error // Error
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
......
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