Use 

    if (toClearSource) {
      clearBlockSource()
    }