From 21a65f181eebc3f2c0cd43fb3383ee3de673745b Mon Sep 17 00:00:00 2001 From: Johann-S Date: Wed, 16 Sep 2015 10:35:29 +0200 Subject: Add throw error for undefined method on plugins --- js/src/tab.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'js/src/tab.js') diff --git a/js/src/tab.js b/js/src/tab.js index 4b311c24e..1283881e4 100644 --- a/js/src/tab.js +++ b/js/src/tab.js @@ -234,6 +234,9 @@ const Tab = (($) => { } if (typeof config === 'string') { + if (data[config] === undefined) { + throw new Error(`No method named "${config}"`) + } data[config]() } }) -- cgit v1.2.3 From 79a4273891cf7929760abc1954037e6b2e31af9a Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Thu, 12 Nov 2015 21:21:32 +0200 Subject: Tweak ESLint rules. --- js/src/tab.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'js/src/tab.js') diff --git a/js/src/tab.js b/js/src/tab.js index 1283881e4..6bfe38739 100644 --- a/js/src/tab.js +++ b/js/src/tab.js @@ -253,9 +253,9 @@ const Tab = (($) => { $(document) .on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { - event.preventDefault() - Tab._jQueryInterface.call($(this), 'show') - }) + event.preventDefault() + Tab._jQueryInterface.call($(this), 'show') + }) /** -- cgit v1.2.3 From 75c39f9138ea95e8d472812117b13f1ed7978157 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Sat, 5 Dec 2015 02:19:21 -0800 Subject: Fix version numbers is JS files; fixes #18435 [skip sauce] [skip validator] --- js/src/tab.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/src/tab.js') diff --git a/js/src/tab.js b/js/src/tab.js index 6bfe38739..393a92b44 100644 --- a/js/src/tab.js +++ b/js/src/tab.js @@ -3,7 +3,7 @@ import Util from './util' /** * -------------------------------------------------------------------------- - * Bootstrap (v4.0.0): tab.js + * Bootstrap (v4.0.0-alpha): tab.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -18,7 +18,7 @@ const Tab = (($) => { */ const NAME = 'tab' - const VERSION = '4.0.0' + const VERSION = '4.0.0-alpha' const DATA_KEY = 'bs.tab' const EVENT_KEY = `.${DATA_KEY}` const DATA_API_KEY = '.data-api' -- cgit v1.2.3