diff options
author | Timmy Willison <timmywillisn@gmail.com> | 2013-09-11 08:41:48 -0500 |
---|---|---|
committer | Timmy Willison <timmywillisn@gmail.com> | 2013-09-11 08:41:48 -0500 |
commit | 2e850fb802fc01f61c8e3b9030e8391c5b283a4e (patch) | |
tree | 0f8a47b50b384683060e96ebacb9914456859859 /src/css/addGetHookIf.js | |
parent | 48a3549bc572bebb5dc581e4818e15f1443b3de2 (diff) | |
download | jquery-2e850fb802fc01f61c8e3b9030e8391c5b283a4e.tar.gz jquery-2e850fb802fc01f61c8e3b9030e8391c5b283a4e.zip |
The cssHook from addGetHookIf wasn't actually getting added
Diffstat (limited to 'src/css/addGetHookIf.js')
-rw-r--r-- | src/css/addGetHookIf.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/css/addGetHookIf.js b/src/css/addGetHookIf.js index f1ec002b3..214af953a 100644 --- a/src/css/addGetHookIf.js +++ b/src/css/addGetHookIf.js @@ -1,8 +1,8 @@ -define( function() { +define(function() { -function addGetHookIf( hookVar, conditionFn, hookFn ) { +function addGetHookIf( conditionFn, hookFn ) { // Define the hook, we'll check on the first run if it's really needed. - hookVar = { + return { get: function() { var condition = conditionFn(); @@ -16,14 +16,13 @@ function addGetHookIf( hookVar, conditionFn, hookFn ) { // Hook not needed (or it's not possible to use it due to missing dependency), // remove it. // Since there are no other hooks for marginRight, remove the whole object. - delete hookVar.get; + delete this.get; return; } // Hook needed; redefine it so that the support test is not executed again. - hookVar.get = hookFn; - return hookVar.get.apply( hookVar, arguments ); + return (this.get = hookFn).apply( hookVar, arguments ); } }; } |