levelten/jquery_widget — comment on commit ba27e8c8d467118cd5bbcaec7c4d53bfeeb6e8ff
File:  line 0
By timeglider:

Integrated this check on the level — using a numerical check agains the established tree_levels variable (which we can assume is the size of the levels array) instead of type checking, which is likely a bit slower.