Skip to content

Commit cd66701

Browse files
committed
Simplified return statement in priority list iteration function
This is a bit cleaner and ensures that the function will always return a boolean value.
1 parent ac3cbd7 commit cd66701

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/tooltipcontroller.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,7 @@ function TooltipController(options) {
292292
finalPlacement = pos;
293293

294294
// break if there were no collisions
295-
if (collisions === Collision.none) {
296-
return false;
297-
}
295+
return collisions !== Collision.none;
298296
});
299297
} else {
300298
// if we're not going to use the smart placement feature then just

0 commit comments

Comments
 (0)