Fixed a bug in which the storage usage area was trying to be accessed even if it wasn't present.
This commit is contained in:
parent
76073a93dd
commit
9dec0ae991
|
@ -207,8 +207,12 @@ Wiki.prototype.display_storage_usage = function( storage_bytes ) {
|
||||||
this.storage_usage_high = false;
|
this.storage_usage_high = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var storage_usage_area = getElement( "storage_usage_area" );
|
||||||
|
if ( !storage_usage_area )
|
||||||
|
return;
|
||||||
|
|
||||||
replaceChildNodes(
|
replaceChildNodes(
|
||||||
"storage_usage_area",
|
storage_usage_area,
|
||||||
createDOM( "div", { "class": storage_usage_class },
|
createDOM( "div", { "class": storage_usage_class },
|
||||||
bytes_to_megabytes( storage_bytes ) + " (" + usage_percent + "%) of " + bytes_to_megabytes( quota_bytes ) )
|
bytes_to_megabytes( storage_bytes ) + " (" + usage_percent + "%) of " + bytes_to_megabytes( quota_bytes ) )
|
||||||
);
|
);
|
||||||
|
|
Reference in New Issue