Skip to content

Commit

Permalink
fix: eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
shishkin committed Aug 11, 2024
1 parent d0c5a3c commit ed9532f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion examples/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ function App() {
}

const container = document.getElementById("app");
container && render(() => <App />, container);
if (container) {
render(() => <App />, container);
}
4 changes: 3 additions & 1 deletion src/map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ export const useMap = () => useContext(MapContext);
export const useMapEffect = (f: (map: maplibre.Map) => void) =>
createEffect(() => {
const map = useMap()?.();
map && f(map);
if (map) {
f(map);
}
});

export type MapProps = {
Expand Down

0 comments on commit ed9532f

Please sign in to comment.