Skip to content

Commit

Permalink
$mol_file fix root dir detection
Browse files Browse the repository at this point in the history
  • Loading branch information
zerkalica committed Nov 15, 2024
1 parent 8186ecc commit 47ef4b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions file/base/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ namespace $ {
const path = this.path()
const base = (this.constructor as typeof $mol_file_base).base

// Если путь выше или равен base - считаем это корнем
return base.startsWith(path)
// Если путь выше или равен base или если parent такойже как и this - считаем это корнем
return base.startsWith(path) || this == this.parent()
}

@ $mol_mem
Expand Down
8 changes: 4 additions & 4 deletions view/tree2/to/dts/dts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ namespace $ {
if (prop_parts.key) {
types.push( type_enforce.call(
this,
method.data(`${method.type}_${klass_name}_${++assert_count}`),
method.data(`${method.type}__${klass_name}_${++assert_count}`),
parameters.call(this, main, prop, 0),
parameters.call(this, second_main, second_key, 0),
) )
Expand All @@ -187,7 +187,7 @@ namespace $ {
if (prop_parts.next) {
types.push( type_enforce.call(
this,
method.data(`${method.type}_${klass_name}_${++assert_count}`),
method.data(`${method.type}__${klass_name}_${++assert_count}`),
parameters.call(this, main, prop, prop_parts.key ? 1 : 0),
parameters.call(this, second_main, second_key, (left_parts.next ? left_parts : right_parts).key ? 1 : 0),
) )
Expand Down Expand Up @@ -281,7 +281,7 @@ namespace $ {
types.push(
type_enforce.call(
this,
input.data(`${ klass.type }_${prop.type.replace(/[\?\*]*/g, '')}_${++assert_count}`),
input.data(`${ klass.type }_${prop.type.replace(/[\?\*]*/g, '')}__${++assert_count}`),
result,
array_type
)
Expand All @@ -305,7 +305,7 @@ namespace $ {
types.push(
type_enforce.call(
this,
first.data(`${input.type}_${klass_name}_${++assert_count}`),
first.data(`${input.type}__${klass_name}_${++assert_count}`),
[
first.data('[ '),
...args,
Expand Down

0 comments on commit 47ef4b4

Please sign in to comment.