Skip to content

Commit 35e4139

Browse files
author
Waley Chen
committed
Merge pull request #188 from 10gen/INT-741-store-version
INT-741 🎉 persisting last known version to localstorage
2 parents 7b1f19d + 6eb68bf commit 35e4139

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/app.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,6 @@ app.extend({
259259
*
260260
* @param {String} id - A key in `FEATURES`.
261261
* @param {Boolean} bool - whether to enable (true) or disable (false)
262-
* @return {Boolean}
263262
*/
264263
setFeature: function(id, bool) {
265264
FEATURES[id] = bool;

src/home/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
var _ = require('lodash');
21
var View = require('ampersand-view');
32
var format = require('util').format;
43
var SidebarView = require('../sidebar');
@@ -51,9 +50,9 @@ var HomeView = View.extend({
5150
},
5251
render: function() {
5352
this.renderWithTemplate(this);
54-
if (_.isUndefined(localStorage.tourHasRun)) {
53+
if (localStorage.lastKnownVersion !== app.meta['App Version']) {
5554
this.renderSubview(new TourView(), this.queryByHook('tour-container'));
56-
localStorage.tourHasRun = 'true';
55+
localStorage.lastKnownVersion = app.meta['App Version'];
5756
}
5857
},
5958
onInstanceFetched: function() {

0 commit comments

Comments
 (0)