Skip to content

Commit c4fcf72

Browse files
author
_pants
committed
allow reset when SKIPSETUP == true
1 parent a4c3226 commit c4fcf72

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

mock/http_api.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,6 @@ ApiServlet.MOUNT_POINT = 'api';
4343

4444
ApiServlet.RESET_INTERNAL_STATE = {
4545
lastModal: MODAL.none,
46-
modalsCompleted: {
47-
welcome: SKIPSETUP,
48-
authorize: SKIPSETUP,
49-
proxiedSites: SKIPSETUP,
50-
systemProxy: SKIPSETUP,
51-
lanternFriends: SKIPSETUP,
52-
finished: SKIPSETUP
53-
},
5446
appliedScenarios: {
5547
os: 'osx',
5648
location: 'nyc',
@@ -69,6 +61,14 @@ ApiServlet.RESET_INTERNAL_STATE = {
6961

7062
ApiServlet.prototype.reset = function() {
7163
this._internalState = _.cloneDeep(ApiServlet.RESET_INTERNAL_STATE);
64+
this._internalState.modalsCompleted = {
65+
welcome: SKIPSETUP,
66+
authorize: SKIPSETUP,
67+
proxiedSites: SKIPSETUP,
68+
systemProxy: SKIPSETUP,
69+
lanternFriends: SKIPSETUP,
70+
finished: SKIPSETUP
71+
};
7272
this.resetModel();
7373
this.model = this._bayeuxBackend.model;
7474
merge(this.model, {
@@ -519,6 +519,7 @@ ApiServlet._handlerForModal[MODAL.confirmReset] = function(interaction, res) {
519519
if (interaction == INTERACTION.cancel) {
520520
this.updateModel({modal: MODAL.settings}, true);
521521
} else if (interaction == INTERACTION.reset) {
522+
SKIPSETUP = false;
522523
this.reset();
523524
} else {
524525
res.writeHead(400);

0 commit comments

Comments
 (0)