mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-05 18:34:39 +03: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
2ac3b146b1
commit
b16284f1ed
7
core/client/app/components/gh-blog-url.js
Normal file
7
core/client/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
core/client/app/templates/components/gh-blog-url.hbs
Normal file
1
core/client/app/templates/components/gh-blog-url.hbs
Normal file
@ -0,0 +1 @@
|
||||
{{{config.blogUrl}}}
|
Loading…
Reference in New Issue
Block a user