Skip to content

Commit

Permalink
Fix #70 #72
Browse files Browse the repository at this point in the history
  • Loading branch information
qiuxiang committed May 30, 2019
1 parent 41500e7 commit c135394
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"location",
"geolocation"
],
"version": "1.0.2",
"version": "1.0.3",
"author": "7c00 <[email protected]>",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions src/geolocation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default class Geolocation {
) {
const listener = addLocationListener(location => {
if (location.errorCode) {
error(new PositionError(location.errorCode, location.errorInfo, location));
error && error(new PositionError(location.errorCode, location.errorInfo, location));
} else {
success(toPosition(location));
}
Expand All @@ -107,7 +107,7 @@ export default class Geolocation {
) {
watchMap[++watchId] = addLocationListener(location => {
if (location.errorCode) {
error(new PositionError(location.errorCode, location.errorInfo, location));
error && error(new PositionError(location.errorCode, location.errorInfo, location));
} else {
success(toPosition(location));
}
Expand Down

0 comments on commit c135394

Please sign in to comment.