mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 15:12:58 +03:00
15 lines
341 B
JavaScript
15 lines
341 B
JavaScript
|
import Helper from '@ember/component/helper';
|
||
|
import {inject as service} from '@ember/service';
|
||
|
|
||
|
export default class FullEmailAddressHelper extends Helper {
|
||
|
@service config;
|
||
|
|
||
|
compute([email]) {
|
||
|
if (email.indexOf('@') > -1) {
|
||
|
return email;
|
||
|
}
|
||
|
|
||
|
return `${email}@${this.config.emailDomain}`;
|
||
|
}
|
||
|
}
|