Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jridgewell committed Mar 13, 2018
1 parent 64f2bbb commit a612aa1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions extensions/amp-story/0.1/test/test-variable-service.js
Expand Up @@ -33,7 +33,8 @@ describes.fakeWin('amp-story variable service', {}, () => {
},
});

expect(variableService.pageIndex).to.equal(123);
expect(variableService.pageId).to.equal('my-page-id');
const variables = variableService.get();
expect(variables.pageIndex).to.equal(123);
expect(variables.pageId).to.equal('my-page-id');
});
});
6 changes: 3 additions & 3 deletions extensions/amp-story/0.1/variable-service.js
Expand Up @@ -37,7 +37,7 @@ export class AmpStoryVariableService {
};

/** @private {boolean} */
this.initialized_ = false;
this.isInitialized_ = false;
}

/**
Expand All @@ -48,7 +48,7 @@ export class AmpStoryVariableService {
case StateChangeType.ACTIVE_PAGE:
const {pageIndex, pageId} = stateChangeEvent.value;
const variables = this.variables_;
this.initialized_ = true;
this.isInitialized_ = true;
variables.pageIndex = pageIndex;
variables.pageId = pageId;
break;
Expand All @@ -59,7 +59,7 @@ export class AmpStoryVariableService {
* @return {!StoryVariableDef}
*/
get() {
dev().assert(this.initialized_);
dev().assert(this.isInitialized_);
// TODO(newmius): You should probably Object.freeze this in development.
return this.variables_;
}
Expand Down

0 comments on commit a612aa1

Please sign in to comment.