Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix JSON-P check in loadJSON in the case there is no params hash

  • Loading branch information...
commit 6ee201a2a0227ded4f7bf96c7c8d9f4b07644b54 1 parent 77c33a7
@mislav authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  toolkit/toolkit.js
View
2  toolkit/toolkit.js
@@ -172,7 +172,7 @@ function ajax(params) {
function loadJSON(url, onload, params) {
url = new URL(url)
- if (params.jsonp) {
+ if (params && params.jsonp) {
var head = document.getElementsByTagName('head')[0],
script = document.createElement('script'),
jsonp = ('string' == typeof params.jsonp) ? params.jsonp : '_callback',
Please sign in to comment.
Something went wrong with that request. Please try again.