question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'total' of undefined

See original GitHub issue

I have a problem. Angular 5 `

// component tpl <ngx-datatable [rows]=“rows” [columns]=“columns”

</ngx-datatable>

// component rows = [ { name: ‘Austin’, gender: ‘Male’, company: ‘Swimlane’ }, { name: ‘Dany’, gender: ‘Male’, company: ‘KFC’ }, { name: ‘Molly’, gender: ‘Female’, company: ‘Burger King’ }, ]

columns = [ { prop: ‘name’ }, { name: ‘Gender’ }, { name: ‘Company’ } ]

` DataTableBodyComponent.html:15 ERROR TypeError: Cannot read property ‘total’ of undefined at Object.eval [as updateDirectives] (DataTableBodyComponent.html:20) at Object.debugUpdateDirectives [as updateDirectives] (core.js:14339) at checkAndUpdateView (core.js:13508) at callViewAction (core.js:13858) at execEmbeddedViewsAction (core.js:13816) at checkAndUpdateView (core.js:13509) at callWithDebugContext (core.js:14740) at Object.debugCheckAndUpdateView [as checkAndUpdateView] (core.js:14277) at ViewRef_.detectChanges (core.js:11300) at DataTableBodyComponent…/src/components/body/body.component.ts.DataTableBodyComponent.updateRows (index.js:3443)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
FrancescoBorzicommented, Nov 20, 2017

reverting to 11.0.4 apparently solves the issue for me

1reaction
mmahmadcommented, Nov 20, 2017

Same. The exact line of error is: var currVal_5 = _co.columnGroupWidths.total; in the component DataTableBodyComponent.ngfactory.js

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: Cannot read property 'total' of undefined
The error means that json.value is undefined , which in turn means that json (most likely) doesn't have such a property. – ...
Read more >
Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError : Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >
Uncaught TypeError: Cannot read property of undefined In
Uncaught TypeError : Cannot read property of undefined error occurs in Chrome when you read a property or call a method on an...
Read more >
5/7 TypeError: Cannot read property 'total' of undefined
My code: var cashRegister = { total:0, lastTransactionAmount:0, add: function(itemCost) ... 5/7 TypeError: Cannot read property 'total' of undefined.
Read more >
Uncaught TypeError: Cannot read property 'total' of undefined
Following the regular checkout process, now in both pages cart and checkout WooCommerce keeps loading and loading and in the console it gives...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found