mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Fix mistaken cordova ClientVersions insert/update inside onListening block.
This commit is contained in:
@@ -108,6 +108,18 @@ var updateVersions = function (shouldReloadClientProgram) {
|
||||
}});
|
||||
}
|
||||
|
||||
if (! ClientVersions.findOne({_id: "version-cordova"})) {
|
||||
ClientVersions.insert({
|
||||
_id: "version-cordova",
|
||||
version: Autoupdate.autoupdateVersionCordova,
|
||||
refreshable: false
|
||||
});
|
||||
} else {
|
||||
ClientVersions.update("version-cordova", { $set: {
|
||||
version: Autoupdate.autoupdateVersionCordova
|
||||
}});
|
||||
}
|
||||
|
||||
// Use `onListening` here because we need to use
|
||||
// `WebAppInternals.refreshableAssets`, which is only set after
|
||||
// `WebApp.generateBoilerplate` is called by `main` in webapp.
|
||||
@@ -124,18 +136,6 @@ var updateVersions = function (shouldReloadClientProgram) {
|
||||
assets: WebAppInternals.refreshableAssets
|
||||
}});
|
||||
}
|
||||
|
||||
if (! ClientVersions.findOne({_id: "version-cordova"})) {
|
||||
ClientVersions.insert({
|
||||
_id: "version-cordova",
|
||||
version: Autoupdate.autoupdateVersionCordova,
|
||||
refreshable: false
|
||||
});
|
||||
} else {
|
||||
ClientVersions.update("version-cordova", { $set: {
|
||||
version: Autoupdate.autoupdateVersionCordova
|
||||
}});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user