def containsIf(node):
    """ Checks whether the given node contains another if-statement """

    if node.type == "if":
        return True

    for child in node:
        if child is None:
            pass

        # Blocks reset this if-else problem so we ignore them
        # (and their content) for our scan.
        if child.type == "block":
            pass

        # Script blocks reset as well (protected by other function)
        elif child.type == "script":
            pass

        elif containsIf(child):
            return True

    return False