Skip to content

Commit

Permalink
Merge pull request #26 from hyoo-ru/new-tree2
Browse files Browse the repository at this point in the history
$mol_view_tree2 refactor, hyoo-ru/mam_mol#646
  • Loading branch information
nin-jin authored Feb 11, 2024
2 parents 1cd0ffc + 2fda0aa commit 287a255
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tree.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ namespace $.$$ {
const pipeline = this.pipeline()
const last = pipeline[ pipeline.length - 1 ]

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

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

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

0 comments on commit 287a255

Please sign in to comment.