Fix dropped-file load crash on null pins
applyPins destructured its argument, whose default only covers undefined; dropped files pass pins: null. Guard with || {}.
This commit is contained in:
@@ -131,7 +131,8 @@ export class Show {
|
|||||||
*
|
*
|
||||||
* @returns {boolean} true when anything was pinned
|
* @returns {boolean} true when anything was pinned
|
||||||
*/
|
*/
|
||||||
applyPins({ venueSel = null, viz = null } = {}) {
|
applyPins(pins) {
|
||||||
|
const { venueSel = null, viz = null } = pins || {};
|
||||||
if (!this.look || (!venueSel && !viz)) return false;
|
if (!this.look || (!venueSel && !viz)) return false;
|
||||||
let pinned = false;
|
let pinned = false;
|
||||||
if (venueSel && this.look.venue) {
|
if (venueSel && this.look.venue) {
|
||||||
|
|||||||
Reference in New Issue
Block a user