mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 19:29:34 +08:00
FIX: remove scrolling jankiness
This commit is contained in:
@ -18,13 +18,15 @@ RawHandlebars.helpers['get'] = function(context, options) {
|
||||
var firstContext = options.contexts[0];
|
||||
var val = firstContext[context];
|
||||
|
||||
if (context.indexOf('controller') === 0) {
|
||||
context = context.replace(/^controller\./, '');
|
||||
if (context.indexOf('controller.') === 0) {
|
||||
context = context.slice(context.indexOf('.') + 1);
|
||||
}
|
||||
|
||||
if (val && val.isDescriptor) { return Em.get(firstContext, context); }
|
||||
val = val === undefined ? Em.get(firstContext, context): val;
|
||||
return val;
|
||||
if (val && val.isDescriptor) {
|
||||
return Em.get(firstContext, context);
|
||||
}
|
||||
|
||||
return val === undefined ? Em.get(firstContext, context) : val;
|
||||
};
|
||||
|
||||
// adds compatability so this works with stringParams
|
||||
|
Reference in New Issue
Block a user