Skip to content

Commit

Permalink
PopupOptions are optional (#6670)
Browse files Browse the repository at this point in the history
  • Loading branch information
TimPetricola authored and jfirebaugh committed May 16, 2018
1 parent cd88621 commit 629b1c1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/ui/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ const defaultOptions = {
export type Offset = number | PointLike | {[Anchor]: PointLike};

export type PopupOptions = {
closeButton: boolean,
closeOnClick: boolean,
anchor: Anchor,
offset: Offset,
className: string
closeButton?: boolean,
closeOnClick?: boolean,
anchor?: Anchor,
offset?: Offset,
className?: string
};

/**
Expand Down Expand Up @@ -284,7 +284,7 @@ export default class Popup extends Evented {

const pos = this._pos = this._map.project(this._lngLat);

let anchor: Anchor = this.options.anchor;
let anchor: ?Anchor = this.options.anchor;
const offset = normalizeOffset(this.options.offset);

if (!anchor) {
Expand Down

0 comments on commit 629b1c1

Please sign in to comment.