Skip to content

Commit 4ae20b0

Browse files
committed
[refactor] improve title render
1 parent bc7f956 commit 4ae20b0

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

‎src/js/control.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ var control = (function(){
255255
path: "layout.title",
256256
type: "text",
257257
func: function(){
258-
title.render();
258+
title.render.name();
259259
}
260260
},{
261261
element: helper.e(".control-layout-scrollpastend"),

‎src/js/title.js‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
vartitle=(function(){
22

3-
varrender=function(){
3+
varrender={};
4+
5+
render.name=function(){
46
helper.e("title").textContent=state.get().layout.title;
57
};
68

79
varinit=function(){
8-
render();
10+
render.name();
911
};
1012

1113
// exposed methods

0 commit comments

Comments
(0)