Change bodyVisible to check the body element actually exists before accessing offsetWidth.
This prevents errors if FC is used before the DOM has loaded (ie. on an invisible element).
This commit is contained in:
parent
56ae9f1cbf
commit
418399988a
|
@ -125,7 +125,8 @@ function Calendar(element, options, eventSources) {
|
||||||
|
|
||||||
|
|
||||||
function bodyVisible() {
|
function bodyVisible() {
|
||||||
return $('body')[0].offsetWidth !== 0;
|
var body = $('body');
|
||||||
|
return body.length > 0 && body [0].offsetWidth !== 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue