fix leaking global
Merge pull request #329 from Trott/refactor-learner_view_base_framework.js

fix leaking global