Skip to content

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

@nknapp

Description

@nknapp

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions