Skip to content
This repository was archived by the owner on Sep 10, 2023. It is now read-only.

Commit 9c36e19

Browse files
committed
Merge pull request #740 from rafa-ulloa/master
micro optimization in computeURL()
2 parents fe3f2e6 + c9fed8e commit 9c36e19

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/jquery.tokeninput.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,11 +1056,8 @@
10561056

10571057
// compute the dynamic URL
10581058
function computeURL() {
1059-
var url = $(input).data("settings").url;
1060-
if(typeof $(input).data("settings").url == 'function') {
1061-
url = $(input).data("settings").url.call($(input).data("settings"));
1062-
}
1063-
return url;
1059+
var settings = $(input).data("settings");
1060+
return typeof settings.url == 'function' ? settings.url.call(settings) : settings.url;
10641061
}
10651062

10661063
// Bring browser focus to the specified object.

0 commit comments

Comments
 (0)