-
Notifications
You must be signed in to change notification settings - Fork 307
Load controller from action for AMD version #448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
+1 |
shared/base/router.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like realAction is a function (object) and requireAMD expects list of strings as dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, for an AMD app we are getting a string : https://github.com/purusho/rendr/blob/master/shared/base/router.js#L89
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then let's check for the variable type, which will protect us from changes down the road
and will allow more flexible treatment of AMD environment on the server.
|
👍 @rendrjs/maintainers LGTM |
|
Seems good - can you please add a few tests around this? |
|
test added. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tried to run actual app with this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, and it's working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool :)
|
Aw yeah! 83% coverage! We're gettin' there! |
Load controller from action for AMD version
This PR will fix the loading of controllers for the AMD version.
Sample App's PR : rendrjs/rendr-examples#15