File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
src/compiler/compile/nodes/shared Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -175,6 +175,15 @@ export default class Expression {
175
175
} ) ;
176
176
}
177
177
178
+ dynamic_contextual_dependencies ( ) {
179
+ return Array . from ( this . contextual_dependencies ) . filter ( name => {
180
+ return Array . from ( this . template_scope . dependencies_for_name . get ( name ) ) . some ( variable_name => {
181
+ const variable = this . component . var_lookup . get ( variable_name ) ;
182
+ return is_dynamic ( variable ) ;
183
+ } ) ;
184
+ } ) ;
185
+ }
186
+
178
187
// TODO move this into a render-dom wrapper?
179
188
manipulate ( block ?: Block , ctx ?: string | void ) {
180
189
// TODO ideally we wouldn't end up calling this method
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export default class Tag extends Node {
19
19
) ;
20
20
}
21
21
is_dependencies_static ( ) {
22
- return this . expression . contextual_dependencies . size === 0 && this . expression . dynamic_dependencies ( ) . length === 0 ;
22
+ return this . expression . dynamic_contextual_dependencies ( ) . length === 0 && this . expression . dynamic_dependencies ( ) . length === 0 ;
23
23
}
24
24
check_if_content_dynamic ( ) {
25
25
if ( ! this . is_dependencies_static ( ) ) {
You can’t perform that action at this time.
0 commit comments