Skip to content

Commit

Permalink
fix(compiler-sfc): $attrs problem caused by __DEV__ (vuejs#8353)
Browse files Browse the repository at this point in the history
  • Loading branch information
kirklin committed May 18, 2023
1 parent d621d4c commit f621f37
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/runtime-core/src/componentPublicInstance.ts
Expand Up @@ -355,7 +355,9 @@ export const PublicInstanceProxyHandlers: ProxyHandler<any> = {
if (publicGetter) {
if (key === '$attrs') {
track(instance, TrackOpTypes.GET, key)
__DEV__ && markAttrsAccessed()
if (__DEV__) {
markAttrsAccessed()
}
} else if (__DEV__ && key === '$slots') {
track(instance, TrackOpTypes.GET, key)
}
Expand Down

0 comments on commit f621f37

Please sign in to comment.