quasarframework / quasar

Quasar Framework - Build high-performance VueJS user interfaces in record time
https://quasar.dev
MIT License
25.9k stars 3.51k forks source link

QForm's validator break after v1.20.2: TypeError: Cannot read properties of undefined (reading 'length') at QForm.js:86:20 #14507

Closed cha0sCat closed 2 years ago

cha0sCat commented 2 years ago

What happened?

After pressing submit button, the application raises an error:

QForm.js:86 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'length')
    at QForm.js:86:20

container with quasar v1.20.2 and an example code which have this issue: https://codesandbox.io/s/optimistic-hermann-sm37xh?file=/src/pages/Index.vue

*This error log won't show in codesandbox's console, you must enable your own browser's console to see them

v1 20 2

What did you expect to happen?

the console should print 'onSubmit'

container with quasar v1.20.1 which doesn't have this issue: https://codesandbox.io/s/dreamy-khayyam-x76zug?file=/src/pages/Index.vue

v1 20 1

Reproduction URL

https://codesandbox.io/s/optimistic-hermann-sm37xh?file=/src/pages/Index.vue

How to reproduce?

minimal code:

<template>
  <q-form @submit="onSubmit">
    <q-btn type="submit" color="primary" />
  </q-form>
</template>

<script>
export default {
  methods: {
    onSubmit() {
      console.log('onSubmit')
    },
  }
}
</script>

Flavour

Quasar CLI (@quasar/cli | @quasar/app)

Areas

Components (quasar)

Platforms/Browsers

Chrome

Quasar info output

$ /sandbox/node_modules/.bin/quasar info

Operating System - Linux(5.13.0-40-generic) - linux/x64
NodeJs - 14.19.3

Global packages
  NPM - 6.14.17
  yarn - 1.22.19
  @quasar/cli - undefined
  @quasar/icongenie - Not installed
  cordova - Not installed

Important local packages
  quasar - 1.20.2 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in recordtime
  @quasar/app - 2.4.2 -- Quasar Framework local CLI
  @quasar/extras - 1.15.3 -- Quasar Framework fonts, icons and animations
  eslint-plugin-quasar - Not installed
  vue - 2.7.10 -- Reactive, component-oriented view layer for modern web interfaces.
  vue-router - 3.6.5 -- Official router for Vue.js 2
  vuex - 3.6.2 -- state management for Vue.js
  electron - Not installed
  electron-packager - Not installed
  electron-builder - Not installed
  @babel/core - 7.19.3 -- Babel compiler core.
  webpack - 4.46.0 -- Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.
  webpack-dev-server - 3.11.3 -- Serves a webpack app. Updates the browser on changes.
  workbox-webpack-plugin - Not installed
  register-service-worker - 1.7.2 -- Script for registering service worker, with hooks
  typescript - 4.2.2 -- TypeScript is a language for application scale JavaScript development
  @capacitor/core - Not installed
  @capacitor/cli - Not installed
  @capacitor/android - Not installed
  @capacitor/ios - Not installed

Quasar App Extensions
  *None installed*

Networking
  Host - sse-sandbox-sm37xh
  eth0 - 192.168.183.27

Done in 0.40s.

Relevant log output

QForm.js:86 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'length')
    at QForm.js:86:20

Additional context

No response

MilosPaunovic commented 2 years ago

Duplicate https://github.com/quasarframework/quasar/issues/14492

digitalit commented 2 years ago

Anyone knows when v1.21.0 is coming?

Have a nice day