Addepar / Addepar/ember-table

Feeding RecordArray from ember-data causes an error

Open
#584 7 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.7k
Forks
351
Avg merge
1d 22h
Merged PRs (30d)
1

Description

First of all I wish to thank you for the good work.

I'm using Ember 3.0.0 with git's master of ember-table

I'm setting up a new table whose rows are fed from an ember-data RecordArray and I'm getting this javascript error, even when the RecordArray is actually empty:

collapse-tree.js:356 Uncaught TypeError: Ember.get(...).some is not a function
    at CollapseTreeNode.get isLeaf (collapse-tree.js:356)
    at ComputedProperty.get (ember-metal.js:2536)
    at Object._get [as get] (ember-metal.js:1358)
    at CollapseTreeNode.get length (collapse-tree.js:448)
    at ComputedProperty.get (ember-metal.js:2536)
    at _get (ember-metal.js:1358)
    at _getPath (ember-metal.js:1405)
    at Object._get [as get] (ember-metal.js:1390)
    at CollapseTree.get length (collapse-tree.js:626)
    at ComputedProperty.get (ember-metal.js:2536)

Explicitly disabling tree with enableTree=false property works around the problem.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at collapse-tree.js:356, where the stack trace reports the failure while handling a RecordArray, and reproduce it with Ember 3.0.0 and tree support enabled. Compare this with the enableTree=false workaround; done means a table fed by an ember-data RecordArray, including an empty one, no longer raises the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.