mirror of
https://github.com/TryGhost/Ghost-Admin.git
synced 2023-12-14 02:33:04 +01:00
Replace gh-blog-url helper with a component.
Accessing `this` inside an `Ember.HTMLBars.makeBoundHelper` will not always return the containing `view` object. Instead, use a component.
This commit is contained in:
parent
1bb2a145b7
commit
9250273d8d
3 changed files with 8 additions and 6 deletions
7
app/components/gh-blog-url.js
Normal file
7
app/components/gh-blog-url.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
import Ember from 'ember';
|
||||
|
||||
var blogUrl = Ember.Component.extend({
|
||||
tagName: ''
|
||||
});
|
||||
|
||||
export default blogUrl;
|
|
@ -1,6 +0,0 @@
|
|||
import Ember from 'ember';
|
||||
var blogUrl = Ember.HTMLBars.makeBoundHelper(function () {
|
||||
return Ember.String.htmlSafe(this.get('config.blogUrl'));
|
||||
});
|
||||
|
||||
export default blogUrl;
|
1
app/templates/components/gh-blog-url.hbs
Normal file
1
app/templates/components/gh-blog-url.hbs
Normal file
|
@ -0,0 +1 @@
|
|||
{{{config.blogUrl}}}
|
Loading…
Reference in a new issue