You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like the Google Data importer is attempting to initialize its list of documents at startup even if it isn't visible or being used.
index-bundle.js:37619 Uncaught TypeError: Cannot read property 'sort' of undefined
at Refine.GDataSourceUI._renderDocuments (index-bundle.js:37619)
at Object.success (index-bundle.js:37550)
at fire (index-bundle.js:3234)
at Object.fireWith [as resolveWith] (index-bundle.js:3364)
at done (index-bundle.js:9842)
at XMLHttpRequest.callback (index-bundle.js:10313)
The offending code is
var docs = o.documents;
...
docs.sort(function(a, b) { return b.updatedDateTime - a.updatedDateTime; });
Where the contents of o are an error message saying "Not authorized".
It's wasteful to do this initialization at every startup when it's rarely going to be needed. It should be deferred until the importer tab is selected.
It looks like part of the problem is that this test isn't failing:
if (GdataExtension.isAuthorized()) {
this._listDocuments();
}
It looks like the Google Data importer is attempting to initialize its list of documents at startup even if it isn't visible or being used.
The offending code is
Where the contents of
o
are an error message saying "Not authorized".It's wasteful to do this initialization at every startup when it's rarely going to be needed. It should be deferred until the importer tab is selected.
It looks like part of the problem is that this test isn't failing:
but it probably shouldn't even be executing that.
Originally posted by @tfmorris in OpenRefine/OpenRefine#3054 (comment)
The text was updated successfully, but these errors were encountered: