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

Cannot read property 'skipLogging' of undefined #641

Closed
sachinik19 opened this issue Sep 9, 2014 · 2 comments
Closed

Cannot read property 'skipLogging' of undefined #641

sachinik19 opened this issue Sep 9, 2014 · 2 comments

Comments

@sachinik19
Copy link

When updated compund to ver. 1.1.14.

Extract from StackTrace :

Safely killing child process on Error: TypeError: Cannot read property 'skipLogging' of undefined
at ControllerBridge.getInstance (/home/suchit/dev/website/node_modules/compound/lib/controller-bridge.js:231:26)
at ControllerBridge.loadController (/home/suchit/dev/website/node_modules/compound/lib/controller-bridge.js:193:21)

Possible Fix : In /lib/controller-bridge.js line 223

var Controller, buildFromEval;
if (name in controllers && !name.match(/_controller$/)) {
    Controller = compound.controller.constructClass(name, controllers[name]);
    Controller.skipLogging = controllers[name].skipLogging;
} else {
    Controller = compound.controller.constructClass(name);
    buildFromEval = controllers[name + '_controller'];
    Controller.skipLogging = controllers[name+ '_controller'].skipLogging;
}
@asergiychuk
Copy link

same here. How can it fixed?

    var Controller, buildFromEval;
    if (name in controllers && !name.match(/_controller$/)) {
        Controller = compound.controller.constructClass(name, controllers[name]);
    } else {
        Controller = compound.controller.constructClass(name);
        buildFromEval = controllers[name + '_controller'];
    }
    if (controllers[name].skipLogging) {
        Controller.skipLogging = controllers[name].skipLogging;
    }

line 231 if (controllers[name].skipLogging) {

name = 'index'
but object controllers does not contain this properties

@1602 1602 closed this as completed in 0dca8e1 Sep 9, 2014
@1602
Copy link
Owner

1602 commented Sep 9, 2014

Thanks guys, fixed, released.

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

No branches or pull requests

3 participants