File tree Expand file tree Collapse file tree 4 files changed +10
-14
lines changed
Expand file tree Collapse file tree 4 files changed +10
-14
lines changed Original file line number Diff line number Diff line change 22 "id" : " obsidian-leaflet-plugin" ,
33 "name" : " Obsidian Leaflet" ,
44 "description" : " Leaflet integration for Obsidian.md" ,
5- "version" : " 0.2.0 " ,
5+ "version" : " 0.2.1 " ,
66 "minAppVersion" : " 0.11.0" ,
77 "author" : " Jeremy Valentine" ,
88 "repo" : " valentine195/obsidian-leaflet-plugin" ,
Original file line number Diff line number Diff line change 11{
22 "name" : " obsidian-leaflet-plugin" ,
3- "version" : " 0.2.0 " ,
3+ "version" : " 0.2.1 " ,
44 "description" : " Leaflet integration for Obsidian.md" ,
55 "main" : " main.js" ,
66 "scripts" : {
Original file line number Diff line number Diff line change @@ -79,7 +79,12 @@ export default class ObsidianLeaflet extends Plugin {
7979 console . log ( "loading leaflet plugin" ) ;
8080
8181 await this . loadSettings ( ) ;
82-
82+ if ( ! this . AppData . mapMarkers ?. every ( map => map . file ) ) {
83+ this . AppData . mapMarkers = this . AppData . mapMarkers . map ( map => {
84+ if ( ! map . file ) map . file = map . path . slice ( 0 , map . path . indexOf ( '.md' ) + 3 ) ;
85+ return map ;
86+ } )
87+ }
8388 this . markerIcons = this . generateMarkerMarkup ( this . AppData . markerIcons ) ;
8489
8590 this . registerMarkdownCodeBlockProcessor (
@@ -214,19 +219,10 @@ export default class ObsidianLeaflet extends Plugin {
214219 }
215220
216221 async loadSettings ( ) {
217- let data : ObsidianAppData = await this . loadData ( ) ;
218-
219- if ( ! data . mapMarkers . every ( map => map . file ) ) {
220- data . mapMarkers = data . mapMarkers . map ( map => {
221- if ( ! map . file ) map . file = map . path . slice ( 0 , map . path . indexOf ( '.md' ) + 3 ) ;
222- return map ;
223- } )
224- }
225-
226222 this . AppData = Object . assign (
227223 { } ,
228224 DEFAULT_SETTINGS ,
229- data
225+ await this . loadData ( )
230226 ) ;
231227 }
232228 async saveSettings ( ) {
Original file line number Diff line number Diff line change 11{
2- "0.2.0 " : " 0.11.0"
2+ "0.2.1 " : " 0.11.0"
33}
You can’t perform that action at this time.
0 commit comments