mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Fix autoupdate to ship autoupdateVersion to the client
This commit is contained in:
@@ -78,8 +78,7 @@ Autoupdate._retrySubscription = function () {
|
||||
if (Package.reload) {
|
||||
var checkNewVersionDocument = function (id, fields) {
|
||||
var self = this;
|
||||
var isRefreshable = id === 'version-refreshable';
|
||||
if (isRefreshable &&
|
||||
if (id === 'version-refreshable' &&
|
||||
fields.version !== autoupdateVersionRefreshable) {
|
||||
autoupdateVersionRefreshable = fields.version;
|
||||
// Switch out old css links for the new css links. Inspired by:
|
||||
@@ -131,7 +130,7 @@ Autoupdate._retrySubscription = function () {
|
||||
attachStylesheetLink(newLink);
|
||||
});
|
||||
}
|
||||
else if (! isRefreshable &&
|
||||
else if (id === 'version' &&
|
||||
fields.version !== autoupdateVersion && handle) {
|
||||
handle.stop();
|
||||
Package.reload.Reload._reload();
|
||||
|
||||
@@ -116,9 +116,7 @@ Meteor.startup(function () {
|
||||
// Allow people to override Autoupdate.autoupdateVersion before startup.
|
||||
// Tests do this.
|
||||
startupVersion = Autoupdate.autoupdateVersion;
|
||||
WebApp.onListening(function () {
|
||||
updateVersions(false);
|
||||
});
|
||||
updateVersions(false);
|
||||
});
|
||||
|
||||
Meteor.publish(
|
||||
@@ -132,4 +130,4 @@ Meteor.publish(
|
||||
// Listen for SIGUSR2, which signals that a client asset has changed.
|
||||
process.on('SIGUSR2', Meteor.bindEnvironment(function () {
|
||||
updateVersions(true);
|
||||
}));
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user