Skip to content

TypeError: 'undefined' is not an object (evaluating 'this.parent.appendChild') #130

@Romick2005

Description

@Romick2005

The problem exist only on safari.
Line
this.parent = $document.find('body')[0];//this.parent = undefined;
...
this.parent.appendChild(this.progressbarEl[0]);//thows error
throws error:
TypeError: 'undefined' is not an object (evaluating 'this.parent.appendChild')
Can you please replace it lie:
this.parent =$document[0].body;

Example test case:
app.run([
'ngProgressFactory',
'$document',
function (
ngProgressFactory,
$document
) {
if (!$document.find('body')[0]) {
console.error('Erorr');
}
ajaxProgressBar = ngProgressFactory.createInstance();//throws error
......
}
]);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions