Skip to content

Commit

Permalink
Merge pull request #28 from observerly/bugfix/composable/useObserver
Browse files Browse the repository at this point in the history
[Bugfix] Potential hosted refs bug within the useObserver() composable.
  • Loading branch information
michealroberts authored Dec 29, 2021
2 parents 48626ad + 594aee6 commit 89c6781
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/composables/useObserver/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ export const validateLongitude = (longitude: number): boolean => {
return (isFinite(longitude) && Math.abs(longitude) <= 180 && Math.abs(longitude) >= -180) || false
}

// Obtain the querystring params of the url, if any:
const params = useUrlSearchParams('history')

export interface Observer {
/**
*
Expand Down Expand Up @@ -72,6 +69,9 @@ export const useObserver = (options: UseObserverOptions) => {
elevation: ele = defaultObserver.elevation
} = options

// Obtain the querystring params of the url, if any:
const params = useUrlSearchParams('history')

// Reactive Geolocation API. It allows the user to provide their location
// to web applications if they so desire. For privacy reasons, the user is
// asked for permission to report location information.
Expand Down
11 changes: 11 additions & 0 deletions vite.lib.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ export default defineConfig({
entry: resolve(__dirname, 'src/index.ts'),
name: 'useaestrium',
fileName: format => `useaestrium.${format}.js`
},
rollupOptions: {
external: ['vue', '@observerly/celestia'],
output: {
sourcemap: false,
// Provide global variables to use in the UMD build
// for externalized deps
globals: {
vue: 'Vue'
}
}
}
}
})

0 comments on commit 89c6781

Please sign in to comment.