Skip to content

Commit

Permalink
chore(space-tool): return boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
philippfromme committed Aug 15, 2022
1 parent 765768d commit 9b5270e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/features/space-tool/SpaceTool.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,11 @@ SpaceTool.prototype.toggle = function() {
SpaceTool.prototype.isActive = function() {
var context = this._dragging.context();

return context && /^spaceTool/.test(context.prefix);
if (context) {
return /^spaceTool/.test(context.prefix);
}

return false;
};

// helpers //////////
Expand Down
2 changes: 1 addition & 1 deletion test/spec/features/space-tool/SpaceToolSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ describe('features/space-tool', function() {

expect(context).not.to.exist;

expect(spaceTool.isActive()).not.to.exist;
expect(spaceTool.isActive()).to.be.false;
}));


Expand Down

0 comments on commit 9b5270e

Please sign in to comment.