From be56acdce99d4be49e53fbeb4badd1e016a5672c Mon Sep 17 00:00:00 2001 From: Max Howell Date: Mon, 4 Jun 2018 19:11:13 -0400 Subject: [PATCH] Fix the playground (been broken a while now!) --- PromiseKit.playground/Contents.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PromiseKit.playground/Contents.swift b/PromiseKit.playground/Contents.swift index 2e91b08..3ade47e 100644 --- a/PromiseKit.playground/Contents.swift +++ b/PromiseKit.playground/Contents.swift @@ -11,17 +11,17 @@ func promise3() -> Promise { } firstly { - Promise(value: 1) + Promise.value(1) }.map { _ in 2 }.then { _ in promise3() }.done { print($0) // => 3 -}.ensure { - PlaygroundPage.current.finishExecution() }.catch { error in // only happens for errors +}.finally { + PlaygroundPage.current.finishExecution() } PlaygroundPage.current.needsIndefiniteExecution = true