Tiny refactor to pass JSHint