Skip to content

Commit 47d5dcc

Browse files
committed
chore: Short-circuit if 1.5 component is supported
1 parent 33113bf commit 47d5dcc

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,6 @@ In lieu of a formal styleguide, take care to maintain the existing coding style.
8282
## Release history
8383

8484
- 0.0.2
85-
- Bugfix isolate scope when `bindings` is omitted
85+
- Bugfix isolate scope when `bindings` is omitted, short-circuit if .component() is already supported
8686
- 0.0.1
8787
- Initial release

dist/angular-component.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! angular-component v0.0.1 | (c) 2016 @toddmotto | https://github.com/toddmotto/angular-component */
1+
/*! angular-component v0.0.2 | (c) 2016 @toddmotto | https://github.com/toddmotto/angular-component */
22
(function () {
33

44
var ng = angular.module;
@@ -15,6 +15,10 @@
1515

1616
var hijacked = ng.apply(this, arguments);
1717

18+
if (hijacked.component) {
19+
return hijacked;
20+
}
21+
1822
function component(name, options) {
1923

2024
function factory($injector) {

dist/angular-component.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/angular-component.js

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414

1515
var hijacked = ng.apply(this, arguments);
1616

17+
if (hijacked.component) {
18+
return hijacked;
19+
}
20+
1721
function component(name, options) {
1822

1923
function factory($injector) {

0 commit comments

Comments
 (0)