Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed May 26, 2024
1 parent 6de3a81 commit 03c320d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions packages/runtime-vapor/src/directives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,10 @@ export function withDirectives<T extends ComponentInternalInstance | Node>(
const parentScope = getCurrentScope() as BlockEffectScope

if (__DEV__ && !isRenderEffectScope(parentScope)) {
warn(`v-directive should be used inside RenderEffectScope`)
warn(`Directives should be used inside of RenderEffectScope.`)
}

const directivesMap = (parentScope.dirs ||= new Map())

if (!(bindings = directivesMap.get(node))) {
directivesMap.set(node, (bindings = []))
}
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime-vapor/src/directivesChildFragment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { queueJob, queuePostFlushCb } from './scheduler'

/**
* used in createIf and createFor
* manages Directives of child fragments in the component dom.
* manage directives of child fragments in components.
*/
export function createChildFragmentDirectives(
anchor: Node,
Expand Down

0 comments on commit 03c320d

Please sign in to comment.