1

When my Rendr app boots, App.router.currentView always evaluates to undefined and this in turn breaks my client side rendering as

if (this.currentView) {
  this.currentView.remove();
}

does not evalutate to true in the funcion ClientRouter.prototype.getRenderCallback in the file /node_modules/rendr/client/router.js. I've tried tracking down where hte router.currentView is getting set and why it is undefined for me without much luck. Any thoughts on what might be causing this?

LongJeongS
  • 27
  • 1
  • 5
  • Without seeing the relevant code, we can't help you with this. You just told us `x` evaluates to `undefined` in my `y.js` file in `z` directory. How can we figure out what's the issue with such information..? please read [ask] – T J Nov 13 '15 at 16:41
  • I agree that its impossible to answer the question without seeing the relevant code, but as I mentioned in the question, I wasnt able to track down where the `App.router.currentView` is being set, so I can't put the relevant piece of code. The `App.router.currentView` is Rendr framework specific code, so I was hoping someone from the Rendrjs community can point me to the right place. – LongJeongS Nov 13 '15 at 19:54

1 Answers1

0

sounds like you're probably not setting up the app_view correctly, as it was stated before it's pretty hard to figure out exactly what's wrong though :(

My thought would be to make sure you check app_view and look at the way you're doing view inheritance. The last idea is that you're not following the template structure quite right so the views name isn't being evaluated as expected.

  • It was actually caused by a stupid mistake on my end. In `__layout.hbs`, I changed the class of the div that wraps `{{{body}}}` and it looks like that caused current_view to be not bound properly. Thanks for the pointer. – LongJeongS Nov 20 '15 at 03:05