Skip to content
This repository has been archived by the owner. It is now read-only.

Tab active function fix #1562

Closed
wants to merge 2 commits into from
Closed

Tab active function fix #1562

wants to merge 2 commits into from

Conversation

@sonnym
Copy link

sonnym commented Jan 11, 2014

I was encountering some problems using a a function for the active attribute on the tabset element. I was able to track down the issue to an undefined function, and have set it to angular.noop when instead. This pull request includes both a failing test case and the fix.

Please let me know if this needs any additional work before getting pulled in.

sonnym added 2 commits Jan 11, 2014
This test case will cause the following error:

Chrome 31.0 (Linux) tabs active should allow a function as an argument FAILED
        TypeError: undefined is not a function
            at Object.fn (/home/sonny/src/vendor/bootstrap/src/tabs/tabs.js:207:11)
            at Scope.$digest (/home/sonny/src/vendor/bootstrap/misc/test-lib/angular.js:11783:29)
            at Scope.$apply (/home/sonny/src/vendor/bootstrap/misc/test-lib/angular.js:12036:24)
            at generateElm (/home/sonny/src/vendor/bootstrap/src/tabs/test/tabs.spec.js:491:15)
            at null.<anonymous> (/home/sonny/src/vendor/bootstrap/src/tabs/test/tabs.spec.js:500:13)
Chrome 31.0 (Linux): Executed 532 of 532 (1 FAILED) (22.178 secs / 21.353 secs)
by assigning angular.noop to setActive when getActive has an undefined
assign property
@chrisirhc
Copy link
Member

chrisirhc commented Jan 14, 2014

Related to #1539 . Currently the active attribute doesn't support (non-assignable) expressions.

@sonnym
Copy link
Author

sonnym commented Dec 18, 2014

Looks like newer versions do not need this workaround, so I'm closing this. Thanks for all the good work!

@sonnym sonnym closed this Dec 18, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.