diff --git a/lti_consumer/lti_xblock.py b/lti_consumer/lti_xblock.py
index d41d1d572a8ffc15a8bc2bd168930857b87aef72..e859562f0e835ae54670be3e2f53b973041e7c97 100644
--- a/lti_consumer/lti_xblock.py
+++ b/lti_consumer/lti_xblock.py
@@ -1427,6 +1427,8 @@ class LtiConsumerXBlock(StudioEditableXBlockMixin, XBlock):
         Returns:
             float: The css position offset to apply to the modal window
         """
+        if not viewport_percentage:
+            viewport_percentage = 80        # set to default value in case viewport_percentage is None
         return (100 - viewport_percentage) / 2
 
     def get_outcome_service_url(self, service_name="grade_handler"):