mirror of
https://github.com/jbcr/core.git
synced 2026-03-29 20:32:19 +02:00
fix for: TypeError: Cannot read property 'key' of undefined, when accessing http://localhost/bolt/edit/54#media
This commit is contained in:
@@ -88,8 +88,12 @@ export default {
|
||||
if (this.selected === null) {
|
||||
return JSON.stringify([]);
|
||||
} else if (this.selected.map) {
|
||||
filtered = this.selected.map(item => item.key);
|
||||
return JSON.stringify(filtered);
|
||||
if (typeof item !== 'undefined') {
|
||||
filtered = this.selected.map(item => item.key);
|
||||
return JSON.stringify(filtered);
|
||||
} else {
|
||||
return JSON.stringify([]);
|
||||
}
|
||||
} else {
|
||||
return JSON.stringify([this.selected.key]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user