Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

function 'unflat' bug? #1

Open
turner537 opened this issue Dec 5, 2016 · 1 comment
Open

function 'unflat' bug? #1

turner537 opened this issue Dec 5, 2016 · 1 comment

Comments

@turner537
Copy link

I followed the instructions to install and test the ISOBMFF parser. The software repeatedly failed to work. After some investigation I changed the 'unflat' function to the following; it now runs.

module.exports = function unflat (data) {

	var tree = [];

//	_.forEach(_.sortBy(data, 'id'), iterator, tree);   //commented out by JFT
	_.forEach(_.sortBy(data, 'id'),  
    function (obj){
        if (obj.parent !== 0) {
            addToParent(obj, tree);
        } else {
            addToTree(obj, tree)
        }        
    }
    ,tree);
	return tree;
}
@bradisbell
Copy link

@turner537 Do you have a fork of this project that might be more up-to-date?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants