Fixing bug where toggling a data source that was not being edited would
cause a JS exception.