Skip to content

Commit

Permalink
Merge pull request #279 from GDSC-PKNU-Official/fix/#278
Browse files Browse the repository at this point in the history
Fix/#278 : 오버레이 클래스 생성자 함수의 userLocation 타입 변경
  • Loading branch information
hwinkr authored Oct 16, 2023
2 parents fa97d93 + 0d988e2 commit d5bd2cc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pages/Map/handlers/overlays.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ class CustomOverlay implements ICustomOverlay {
private overlays: Record<BuildingType, any[]>;
private openModal: OpenModal;
private closeModal: CloseModal;
private userLocation: Location;
private userLocation: Location | null;

constructor(
openModal: OpenModal,
closeModal: CloseModal,
userLocation: Location,
userLocation: Location | null,
) {
this.openModal = openModal;
this.closeModal = closeModal;
Expand Down Expand Up @@ -56,6 +56,7 @@ class CustomOverlay implements ICustomOverlay {
const { buildingNumber, buildingName, latlng } = building;
const [lat, lng] = latlng;

if (!this.userLocation) return;
hasLocationPermission(this.userLocation)
? this.openModal<typeof modals.confirm>(modals.confirm, {
message: `목적지(${buildingNumber})로 길찾기를 시작할까요?`,
Expand Down

0 comments on commit d5bd2cc

Please sign in to comment.