     } else {
       drawBorders()
     }
-    configureBorderType()
   }
 
   private func clearLayer() {


fileprivate extension BorderDesignable where Self: UIView {
  func drawBorders() {
    if borderSides == .AllSides {
      drawBorders()
    } else {
      drawBorderSides()
    }
  }

  // MARK: All Borders

  private func drawAllBorders() {
    layer.borderColor = borderColor!.cgColor
    layer.borderWidth = borderWidth
  }

  // MARK: Sides

  private func drawBorderSides() {
    let shapeLayer = CAShapeLayer()
    shapeLayer.name = "borderSideLayer"
    shapeLayer.path = makeBorderPath().cgPath

    shapeLayer.strokeColor = borderColor!.cgColor
    shapeLayer.lineWidth = borderWidth
    shapeLayer.frame = bounds
    if borderType == .dash {
      shapeLayer.lineJoin = kCALineJoinRound
      shapeLayer.lineDashPattern = [6, 3]
    }
    layer.insertSublayer(shapeLayer, at: 0)
  }

