ember-cli / ember-cli/ember-page-title

Why does `{{page-title}}` return `''`?

Open
#236 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
187
Forks
58
PR merge metrics
No merged PRs in 30d

Description

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

To wit:

```js
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.