Skip to content

Commit

Permalink
Merge pull request #89 from young-steveo/release-1.6.1
Browse files Browse the repository at this point in the history
Release 1.6.1
  • Loading branch information
young-steveo authored May 17, 2017
2 parents e5aeb15 + 3c0087b commit 368c1d9
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ BottleJS is also available on cdnjs:
```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/bottlejs/VERSION/bottle.min.js"></script>
```
Replace `VERSION` in the above URL with a valid BottleJS version, e.g. `https://cdnjs.cloudflare.com/ajax/libs/bottlejs/1.5.0/bottle.min.js`
Replace `VERSION` in the above URL with a valid BottleJS version, e.g. `https://cdnjs.cloudflare.com/ajax/libs/bottlejs/1.6.1/bottle.min.js`

## Simple Example

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bottlejs",
"version": "1.6.0",
"version": "1.6.1",
"description": "A powerful dependency injection micro container",
"main": "dist/bottle.min.js",
"license": "MIT",
Expand Down
11 changes: 6 additions & 5 deletions dist/bottle.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
;(function(undefined) {
'use strict';
/**
* BottleJS v1.6.0 - 2017-02-22
* BottleJS v1.6.1 - 2017-05-17
* A powerful dependency injection micro container
*
* Copyright (c) 2017 Stephen Young
Expand Down Expand Up @@ -473,12 +473,13 @@
var deps = arguments.length > 2 ? slice.call(arguments, 2) : null;
var bottle = this;
return factory.call(this, name, function GenericFactory() {
var ServiceCopy = Service;
if (deps) {
deps = deps.map(getNestedService, bottle.container);
deps.unshift(Service);
Service = Service.bind.apply(Service, deps);
var args = deps.map(getNestedService, bottle.container);
args.unshift(Service);
ServiceCopy = Service.bind.apply(Service, args);
}
return new Service();
return new ServiceCopy();
});
};

Expand Down
4 changes: 2 additions & 2 deletions dist/bottle.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 368c1d9

Please sign in to comment.