openDatabase: function(dbPath, version, displayName, estimatedSize, creationCallback, errorCallback) {
if (version == null) version = null;
if (displayName == null) displayName = null;
if (estimatedSize == null) estimatedSize = 0;
if (creationCallback == null) creationCallback = null;
if (errorCallback == null) errorCallback = null;
return new SQLitePlugin(dbPath, creationCallback, errorCallback);
}
Since these variable are local, none of them are passed on and most are set to null if they equal null, this makes no sense to me, is this possibly left from some legacy reason? It seems that it should be simply:
openDatabase: function(dbPath, version, displayName, estimatedSize, creationCallback, errorCallback) {
return new SQLitePlugin(dbPath, creationCallback, errorCallback);
}
Since these variable are local, none of them are passed on and most are set to null if they equal null, this makes no sense to me, is this possibly left from some legacy reason? It seems that it should be simply: