[Vuejs]-Vue & Vuex getter array filter causes error online only

0👍

Locally it works – console

(35) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, __ob__: Observer]

Console output locally

  {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, __ob__: Pt]

0:
id: (…)
file: (…)
file_type: (…)
file_conversions: (…)
title: (…)
slug: (…)
text: (…)
preview_text: (…)
external_link: (…)
author: (…)
category: Object
id: (…)
description: “Software”
slug: (…)
constant: (…)
color_code: (…)

but online it doesn’t -thats why im so annoyed. can’t find the issue unless I deploy to staging:

chunk-vendors.433933fc.js:7 TypeError: Cannot read property 'description' of null
at app.eea11d3b.js:1
at Array.filter (<anonymous>)
at postsNews (app.eea11d3b.js:1)
at O.t._wrappedGetters.<computed>.t._wrappedGetters.<computed> (chunk-vendors.433933fc.js:13)
at kr.<anonymous> (chunk-vendors.433933fc.js:13)
at nr.get (chunk-vendors.433933fc.js:7)
at nr.evaluate (chunk-vendors.433933fc.js:7)
at kr.postsNews (chunk-vendors.433933fc.js:7)
at Object.get [as postsNews] (chunk-vendors.433933fc.js:13)
at a.n.<computed> (chunk-vendors.433933fc.js:13)

Leave a comment