Skip to content

Why does {{page-title}} return ''? #236

@muziejus

Description

@muziejus

I'm just curious why the code returns an empty string instead of nothing at all.

To wit:

  compute(params, _hash) {
    let hash = {
      ..._hash,
      id: this.tokenId,
      title: params.join(''),
    };

    this.tokens.push(hash);
    this.tokens.scheduleTitleUpdate();
    return '';
  }

I tried to find if helpers require a return value from compute, etc., but couldn't find anything.

Given that, from my understanding, the helper is all side effect (adjusting a part of the DOM outside of its own container), it feels like this helper should have no return value at all.

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