Skip to content

Commit 15b658a

Browse files
authored
Merge pull request #1 from hyoo-ru/new-tree2
$mol_view_tree2 refactor, hyoo-ru/mam_mol#646
2 parents 0641a92 + 0d1d667 commit 15b658a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

scout.view.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace $.$$ {
1919
@ $mol_mem
2020
data() {
2121
const text = $mol_fetch.text( 'hyoo/scout/_games.tree' )
22-
const json = $mol_tree.fromString( text ).sub.map( tree => tree.clone({ type : '*' }).toJSON() )
22+
const json = this.$.$mol_tree2_from_string( text ).kids.map( tree => this.$.$mol_tree2_to_json(tree.struct('*', tree.kids)) )
2323
return json as $hyoo_scout_gist[]
2424
}
2525

suggest/suggest.view.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ namespace $.$$ {
4040
content : this.descr() ,
4141
}
4242

43-
const gist = new $mol_tree({ type : 'game' , sub : $mol_tree.fromJSON( data ).sub })
43+
const gist = $mol_tree2.struct('game', $mol_tree2_from_json( data ).kids)
4444

4545
const body = encodeURIComponent( gist.toString() + '\n' )
4646

0 commit comments

Comments
 (0)