Adam Shaw 9 лет назад
Родитель
Сommit
e0ecf4da28
2 измененных файлов с 7 добавлено и 6 удалено
  1. 1 1
      src/Calendar.js
  2. 6 5
      tests/dynamic-options.html

+ 1 - 1
src/Calendar.js

@@ -993,7 +993,7 @@ function Calendar_constructor(element, overrides) {
 
 		// special-case handling of single option change.
 		// if only one option change, `optionName` will be its name.
-		if (optionCnt == 1) {
+		if (optionCnt === 1) {
 			if (optionName === 'height' || optionName === 'contentHeight' || optionName === 'aspectRatio') {
 				updateSize(true); // true = allow recalculation of height
 				return;

+ 6 - 5
tests/dynamic-options.html

@@ -113,10 +113,11 @@
 </style>
 </head>
 <body>
-<button id='change-theme-button'>change theme</button>
-<button id='change-dir-button'>change dir</button>
-<button id='change-businessHours-button'>change businessHours</button>
-<button id='change-all-button'>change all</button>
-<div id='calendar'></div>
+	<button id='change-theme-button'>change theme</button>
+	<button id='change-dir-button'>change dir</button>
+	<button id='change-businessHours-button'>change businessHours</button>
+	<button id='change-all-button'>change all</button>
+
+	<div id='calendar'></div>
 </body>
 </html>