image: value type check to prevent error

This commit is contained in:
jean-emmanuel 2018-03-16 18:45:36 +01:00
parent 6428c8bf0f
commit fc923dc73f

View file

@ -76,7 +76,7 @@ module.exports = class Led extends Widget {
}
if (this.value.length) {
if (typeof this.value === 'string' && this.value.length) {
cache_query = this.getProp('cache') || this.value.indexOf('base64') != -1 ?
'' : (this.value.indexOf('?') != -1 ? '&' : '?') + Date.now()