Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'MDL-36609_m22' of git://github.com/markn86/moodle into …

…MOODLE_22_STABLE
  • Loading branch information...
commit f3fc480228316c99ef76edc4887f08adfd0c66f2 2 parents 066fc70 + 82695f7
@samhemelryk samhemelryk authored
Showing with 9 additions and 4 deletions.
  1. +9 −4 lib/javascript-static.js
View
13 lib/javascript-static.js
@@ -320,11 +320,16 @@ M.util.init_maximised_embed = function(Y, id) {
if (Y.Lang.isString(el)) {
el = Y.one('#' + el);
}
- var val = el.getStyle(prop);
- if (val == 'auto') {
- val = el.getComputedStyle(prop);
+ // Ensure element exists.
+ if (el) {
+ var val = el.getStyle(prop);
+ if (val == 'auto') {
+ val = el.getComputedStyle(prop);
+ }
+ return parseInt(val);
+ } else {
+ return 0;
}
- return parseInt(val);
};
var resize_object = function() {
Please sign in to comment.
Something went wrong with that request. Please try again.