Assigning widthRatio to default value when the currentSlideDoc is not loaded yet. Removing errors from the console.

This commit is contained in:
Oleksandr Zhurbenko 2016-01-22 11:07:14 -08:00
parent f287f5f4cb
commit 8fdb83d01a

View File

@ -288,7 +288,7 @@ Meteor.WhiteboardPaperModel = (function() {
_updateZoomRatios() {
let currentSlideDoc;
currentSlideDoc = BBB.getCurrentSlide();
this.widthRatio = currentSlideDoc != null ? currentSlideDoc.slide.width_ratio : void 0;
this.widthRatio = (currentSlideDoc != null ? currentSlideDoc.slide.width_ratio : void 0) || 100;
return this.heightRatio = currentSlideDoc != null ? currentSlideDoc.slide.height_ratio : void 0;
}