Răsfoiți Sursa

use else if

Casey Holzer 9 ani în urmă
părinte
comite
1d4477facd
1 a modificat fișierele cu 1 adăugiri și 2 ștergeri
  1. 1 2
      src/Calendar.js

+ 1 - 2
src/Calendar.js

@@ -730,9 +730,8 @@ function Calendar_constructor(element, overrides) {
 	function _calcSize() { // assumes elementVisible
 	function _calcSize() { // assumes elementVisible
 		if (typeof t.options.getContainerHeight === 'function') {
 		if (typeof t.options.getContainerHeight === 'function') {
 			suggestedViewHeight = t.options.getContainerHeight() - (headerElement ? headerElement.outerHeight(true) : 0);
 			suggestedViewHeight = t.options.getContainerHeight() - (headerElement ? headerElement.outerHeight(true) : 0);
-			return;
 		}
 		}
-		if (typeof t.options.contentHeight === 'number') { // exists and not 'auto'
+		else if (typeof t.options.contentHeight === 'number') { // exists and not 'auto'
 			suggestedViewHeight = t.options.contentHeight;
 			suggestedViewHeight = t.options.contentHeight;
 		}
 		}
 		else if (typeof t.options.height === 'number') { // exists and not 'auto'
 		else if (typeof t.options.height === 'number') { // exists and not 'auto'