diff --git a/src/scripts/Panorama.js b/src/scripts/Panorama.js index 0e6c994..17fb0b2 100644 --- a/src/scripts/Panorama.js +++ b/src/scripts/Panorama.js @@ -96,7 +96,7 @@ export const defaults: Settings = { HideTime: 3000, }, - Markers: [] + Markers: false }; /** @@ -315,7 +315,7 @@ class Panorama extends EventEmitter{ this.videoCanvas.show(); //initial markers - if(this.options.Markers){ + if(this.options.Markers && Array.isArray(this.options.Markers)){ let markerContainer = new MarkerContainer(this.player, { canvas: this.videoCanvas, markers: this.options.Markers, diff --git a/src/scripts/types/Settings.js b/src/scripts/types/Settings.js index f64745b..9a777ea 100644 --- a/src/scripts/types/Settings.js +++ b/src/scripts/types/Settings.js @@ -136,7 +136,7 @@ export type Settings = { HideTime?: number; }; - Markers?: MarkerSettings[], + Markers?: MarkerSettings[] | boolean, ready?: Function;