Skip to content

Commit

Permalink
fix(index): update to latest configuration api
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Aug 13, 2015
1 parent 2016820 commit 9731a85
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import {BindingLanguage} from 'aurelia-templating';
import {TemplatingBindingLanguage} from './binding-language';

export function configure(aurelia){
export function configure(config){
var instance,
getInstance = function (c){
return instance || (instance = c.invoke(TemplatingBindingLanguage));
};

if(aurelia.container.hasHandler(TemplatingBindingLanguage)){
instance = aurelia.container.get(TemplatingBindingLanguage);
if(config.container.hasHandler(TemplatingBindingLanguage)){
instance = config.container.get(TemplatingBindingLanguage);
}else{
aurelia.container.registerHandler(TemplatingBindingLanguage, getInstance);
config.container.registerHandler(TemplatingBindingLanguage, getInstance);
}

aurelia.container.registerHandler(BindingLanguage, getInstance);
config.container.registerHandler(BindingLanguage, getInstance);
}

0 comments on commit 9731a85

Please sign in to comment.