capricorn86/happy-dom

Vue v-for

qmonmert opened this issue · 0 comments

Describe the bug
Since 15.0.0 I have one test which fails on my Vue app. This test is on a specific v-for syntax.

To Reproduce
Log:

FAIL  app/admin/user-management/user-management-edit.component.spec.ts > UserManagementEdit Component > init > Should load user
TypeError: Cannot set properties of undefined (setting 'langKey')
 ❯ Proxy.createElementBlock.createElementVNode.createElementBlock.createElementVNode.createElementBlock.withDirectives.createElementVNode.onUpdate:modelValue._cache.<computed>._cache.<computed> app/admin/user-management/user-management-edit.vue:129:31
    127|             <label for="langKey" v-text="t$('userManagement.langKey')"></label>
    128|             <select class="form-control" id="langKey" name="langKey" v-model="userAccount.langKey">
    129|               <option v-for="(language, key) in languages" :value="key" :key="key">{{ language.name }}</option>
       |                               ^
    130|             </select>
    131|           </div>
 ❯ HTMLSelectElement.<anonymous> ../../../node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.js:1246:20
 ❯ HTMLSelectElement.dispatchEvent ../../../node_modules/happy-dom/src/event/EventTarget.ts:222:42
 ❯ HTMLSelectElement.dispatchEvent ../../../node_modules/happy-dom/src/nodes/element/Element.ts:1224:29
 ❯ HTMLSelectElement.value ../../../node_modules/happy-dom/src/ClassMethodBinder.ts:50:50
 ❯ HTMLSelectElement.dispatchEvent ../../../node_modules/happy-dom/src/event/EventTarget.ts:131:9
 ❯ HTMLSelectElement.dispatchEvent ../../../node_modules/happy-dom/src/nodes/element/Element.ts:1224:29
 ❯ HTMLSelectElement.value ../../../node_modules/happy-dom/src/ClassMethodBinder.ts:50:50
 ❯ HTMLSelectElement.[updateSelectedness] ../../../node_modules/happy-dom/src/nodes/html-select-element/HTMLSelectElement.ts:722:9
 ❯ Proxy.value ../../../node_modules/happy-dom/src/ClassMethodBinder.ts:50:50

Do you think that it is related to this new version? 🙂 Thanks