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

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

Open
Romick2005 opened this issue Feb 2, 2017 · 0 comments

Comments

@Romick2005
Copy link

Romick2005 commented Feb 2, 2017

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
......
}
]);

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

1 participant