FIX: scrolling was off sometimes

Also changed "Jump To Post" to go to the post index in the stream rather than the post number
This commit is contained in:
Régis Hanol
2018-04-05 10:08:48 +02:00
parent a26d3fc2de
commit d5412cff4e
7 changed files with 80 additions and 100 deletions

View File

@ -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