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

does not invoke not existing methods #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/AnimatedInterpolation.js
Expand Up @@ -41,7 +41,7 @@ class AnimatedInterpolation extends AnimatedWithChildren {
}

addListener(callback: ValueListenerCallback): string {
if (!this._parentListener) {
if (!this._parentListener && this._parent.addListener) {
this._parentListener = this._parent.addListener(() => {
for (var key in this._listeners) {
this._listeners[key]({value: this.__getValue()});
Expand All @@ -67,7 +67,9 @@ class AnimatedInterpolation extends AnimatedWithChildren {

__detach(): void {
this._parent.__removeChild(this);
this._parentListener = this._parent.removeListener(this._parentListener);
if (this._parent.removeListener) {
this._parentListener = this._parent.removeListener(this._parentListener);
}
}
}

Expand Down