Skip to content

Commit 287a255

Browse files
authored
Merge pull request #26 from hyoo-ru/new-tree2
$mol_view_tree2 refactor, hyoo-ru/mam_mol#646
2 parents 1cd0ffc + 2fda0aa commit 287a255

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tree.view.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ namespace $.$$ {
4343
const pipeline = this.pipeline()
4444
const last = pipeline[ pipeline.length - 1 ]
4545

46-
const type = last ? map[ last ].output.split('.').filter( Boolean ).reverse() : [ 'text' ]
46+
const type = last ? map[ last as keyof typeof map ].output.split('.').filter( Boolean ).reverse() : [ 'text' ]
4747
if( !type.length ) return Object.keys( map )
4848

49-
return Object.keys( map ).filter( id => {
49+
return (Object.keys( map ) as (keyof typeof map)[]).filter( id => {
5050

5151
const diff = $mol_diff_path( type , map[ id ].input.split('.').reverse() )
5252
if( !diff.prefix.length ) return false

0 commit comments

Comments
 (0)