]> git.ipfire.org Git - thirdparty/vuejs/core.git/commit
fix(runtime-core): do not throw on unknown directives (#6671)
authorCédric Exbrayat <cexbrayat@users.noreply.github.com>
Tue, 8 Nov 2022 02:49:49 +0000 (03:49 +0100)
committerGitHub <noreply@github.com>
Tue, 8 Nov 2022 02:49:49 +0000 (21:49 -0500)
commit04553786e4391b3bfa02f50c2a5baa8d2fe8c7a4
tree31ab67e398b59197c704e9528c02533732697ddb
parentb72a4af38a402447d19b4616d09935c390d0702f
fix(runtime-core): do not throw on unknown directives (#6671)

fix #6340

This commit improves the case when a directive is not found in a template.
As `resolveDirective` returns `undefined`, some code was failing with the following error:

```
TypeError: Cannot read properties of undefined (reading 'deep')
```
packages/runtime-core/__tests__/directives.spec.ts
packages/runtime-core/src/directives.ts