file widget: avoid error with non-string values
This commit is contained in:
parent
d68c0f6c0a
commit
5ba7de9861
1 changed files with 2 additions and 2 deletions
|
|
@ -69,8 +69,8 @@ module.exports = class File extends Widget {
|
|||
|
||||
this.value = v
|
||||
|
||||
var sep = v[0] === '/' ? '/' : '\\'
|
||||
if (this.getProp('hidePath')) {
|
||||
if (this.getProp('hidePath') && typeof v === 'string') {
|
||||
var sep = v[0] === '/' ? '/' : '\\'
|
||||
if (v[v.length - 1] === sep) {
|
||||
this.text.textContent = v.substr(0, v.length - 1).split(sep).pop() + sep
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue