mathjs: mute deprecation warning until there's an easy migration tip to provide

This commit is contained in:
bordun 2020-01-31 15:21:30 +01:00
parent 7f566c4ac2
commit a32598f631

View file

@ -160,7 +160,7 @@ class Widget extends EventEmitter {
}
this.disabledProps = []
this.mathjsDeprecationWarned = false
// this.mathjsDeprecationWarned = false
// cache precision
if (this.props.precision != undefined) {
@ -586,10 +586,10 @@ class Widget extends EventEmitter {
propValue = propValue.replace(/#\{(?:[^{}]|\{[^{}]*\})*\}/g, (m)=>{
// one bracket nesting allowed, if we need two: #\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\}
if (!this.mathjsDeprecationWarned) {
this.mathjsDeprecationWarned = true
ipc.send('error', `Warning: Widget#${this.getProp('id')} MathJS syntax (#{}) is deprecated and will be removed in the future. Consider using the Javascript syntax instead.`)
}
// if (!this.mathjsDeprecationWarned) {
// this.mathjsDeprecationWarned = true
// ipc.send('error', `Warning: Widget#${this.getProp('id')} MathJS syntax (#{}) is deprecated and will be removed in the future. Consider using the Javascript syntax instead.`)
// }
// unescape brackets (not needed anymore, just here for backward compatibility)
m = m.replace(/\\(\{|\})/g, '$1')