Skip to content
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

Bug: server constructor defaultOptions throwing error on start #11

Closed
zpnk opened this issue Apr 24, 2015 · 0 comments
Closed

Bug: server constructor defaultOptions throwing error on start #11

zpnk opened this issue Apr 24, 2015 · 0 comments

Comments

@zpnk
Copy link

zpnk commented Apr 24, 2015

Was playing around with Central and got this error when starting the server:

/central-demo/node_modules/central/server/server.coffee:28
      this.expressApp.set('views', this.options.viewsPath);
                                               ^
TypeError: Cannot read property 'viewsPath' of undefined

It looks like server.coffee calls _.extend on line 20 with arguments in the wrong order:

@options = _.extend(options, defaultOptions)

Simply switching them to place defaultOptions first fixes the issue:

@options = _.extend(defaultOptions, options)

Server.configure has the same call on line 33, with the correct order.

Edit: PR up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant