Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

448
Views
TypeError: no se pueden leer las propiedades de nulo (leyendo 'buscar')"

Estoy tratando de enviar un objeto a una matriz usando vuex pero recibo este error. No sé por qué en Edge funciona muy bien, pero en Chrome y Opera no.

TypeError: no se pueden leer las propiedades de nulo (leyendo 'buscar')"

Tienda Vuex:

 export default { namespaced: true, state: { shoppingCartItems: [], }, mutations: { SET_ITEM(state, payload) { if (state.shoppingCartItems.find(item => item.type === 'custom-item')) { state.shoppingCartItems.push(payload) } else if (state.shoppingCartItems.find(item => item.name === payload.name)) { const index = state.shoppingCartItems.findIndex(item => item.name === payload.name) const value = payload.quantity state.shoppingCartItems[index].quantity += value } else { state.shoppingCartItems.push(payload) } }, } }

En SET_ITEM, verifico si la carga útil es un elemento que ya está en la matriz, por lo que, en lugar de agregarlo nuevamente, suma 1 a este elemento específico. Y de nuevo, en Edge funciona perfectamente, pero en Chrome parece que todo está roto.

Ejemplo de carga útil que SET_ITEM está recibiendo:

 payload = { dimensions: "30x10cm" extraLine: 2 extraQuote: "no" frases: [__ob__: Observer] image: "" name: "custom-item" namesQuantity: 1 names: [{…}, __ob__: Observer] price: 180 quantity: 1 type: "custom-item" }

ingrese la descripción de la imagen aquí

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!