Skip to content

Commit 3b2ecee

Browse files
committed
fix: fixes issue preventing map view from opening
1 parent 1ae41b5 commit 3b2ecee

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "Leaflet integration for Obsidian.md",
55
"main": "main.js",
66
"scripts": {
7-
"dev": "node ./esbuild.config.mjs",
7+
"dev": "export NODE_ENV=development && npm run build",
88
"build": "webpack",
99
"dev-es": "node ./esbuild.config.mjs",
1010
"build-es": "node ./esbuild.config.mjs production"

src/main.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,7 @@ export default class ObsidianLeaflet extends Plugin {
665665
}
666666

667667
public async getLocalFileMarkers(file: TFile, markerFileName = "markers.json"): Promise<MarkerIcon[]> {
668+
if (!file) return [];
668669
const markerFilePath = `${file.parent.path}/${markerFileName}`;
669670
const markerFile = this.app.vault.getAbstractFileByPath(markerFilePath);
670671
const markers: MarkerIcon[] = [];

0 commit comments

Comments
 (0)