Browse Source

issue with switching to same view that was already active

Adam Shaw 8 years ago
parent
commit
57e006642a
1 changed files with 5 additions and 2 deletions
  1. 5 2
      src/Calendar.render.js

+ 5 - 2
src/Calendar.render.js

@@ -237,11 +237,14 @@ Calendar.mixin({
 	renderView: function(viewType, forcedScroll) {
 		var oldView = this.view;
 
+		if (oldView && oldView.type === viewType) {
+			return;
+		}
+
 		this.freezeContentHeight();
 		this.ignoreUpdateViewSize++;
 
-		// if viewType is changing, remove the old view's rendering
-		if (oldView && viewType && oldView.type !== viewType) {
+		if (oldView) {
 			this.clearView();
 			this.destroyBatchRenderingForView(oldView); // do AFTER the clear b/c the clear updates lots of props
 		}