Skip to content

Commit

Permalink
Merge pull request #237 from iv-mexx/master
Browse files Browse the repository at this point in the history
[FIX] Explicitly comparing optionals with nil due to swift changes in beta 5. (Markus Chmelar)
  • Loading branch information
rentzsch committed Aug 16, 2014
2 parents 5ee430c + 29615d0 commit cad68ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/machine.swift.motemplate
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class _<$managedObjectClassName$>: <$customSuperentity$> {
var result: AnyObject? = nil
let results = managedObjectContext.executeFetchRequest(fetchRequest, error: &error)

if error {
if error != nil {
outError.memory = error
} else {
switch results.count {
Expand Down Expand Up @@ -154,7 +154,7 @@ class _<$managedObjectClassName$>: <$customSuperentity$> {
var error: NSError? = nil
let results = managedObjectContext.executeFetchRequest(fetchRequest, error: &error)

if error {
if error != nil {
outError.memory = error
}

Expand Down

0 comments on commit cad68ee

Please sign in to comment.