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

this.parent() should consistently return a promise, at least optionally #7

Open
nknapp opened this issue Apr 2, 2017 · 0 comments
Open

Comments

@nknapp
Copy link
Member

nknapp commented Apr 2, 2017

The .withParent() wraps a function such that the overridden function is available under this.parent(input).

Dependending on the context and the implementation this.parent(input) may return a Promise or not.
This makes it hard to implement the overriding function, because the implementor does not always no the exact function that is overridden (this may depend on the loading order of plugins in Thought for example.

Since customize is otherwise promise agnostic, this.parent(input) should always return the same kind of data, which is a promise, even if the parent preprocessor actually returns immediate data.

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