Skip to content
Permalink
Browse files

feat(project): allow configuration with an object

  • Loading branch information...
doktordirk committed Sep 12, 2016
1 parent 872641d commit 4a521ce27ce7b7ada11a34631904e5705418277d
Showing with 7 additions and 6 deletions.
  1. +7 −6 src/aurelia-view.js
@@ -1,11 +1,12 @@
import {Config} from './config';
import {getLogger} from 'aurelia-logging';

export function configure(aurelia, configCallback) {
export function configure(aurelia, configOrConfigure) {
let config = aurelia.container.get(Config);

if (typeof configCallback === 'function') {
let config = aurelia.container.get(Config);
configCallback(config);
} else if (configCallback) {
getLogger('aurelia-view').warn('config takes a function');
}
return configOrConfigure(config);
}

config.configure(configOrConfigure);
}

0 comments on commit 4a521ce

Please sign in to comment.
You can’t perform that action at this time.