Skip to content

Instantly share code, notes, and snippets.

@gabrielhpugliese
Created March 13, 2013 23:29
Show Gist options
  • Save gabrielhpugliese/5157484 to your computer and use it in GitHub Desktop.
Save gabrielhpugliese/5157484 to your computer and use it in GitHub Desktop.
Reset Session context in hot code push
if (Meteor._reload) {
Meteor._reload.onMigrate('session', function() {
return [true, {
keys : []
}];
});
(function() {
var migrationData = Meteor._reload.migrationData('session');
if (migrationData && migrationData.keys) {
Session.keys = migrationData.keys;
}
})();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment