Skip to content

Commit

Permalink
Merge pull request #25 from hyperoslo/improve/json-dictionary
Browse files Browse the repository at this point in the history
Check if there are any children when before creating the key
  • Loading branch information
vadymmarkov authored Oct 25, 2016
2 parents 29b2390 + 95c2ba8 commit 46ab960
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 6 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@ osx_image: xcode8
language: objective-c

before_install:
- brew update
- if brew outdated | grep -qx carthage; then brew upgrade carthage; fi
- travis_wait 35 carthage bootstrap --platform iOS,Mac,tvOS

script:
- xcodebuild clean build -project Brick.xcodeproj -scheme Brick-iOS -sdk iphonesimulator
- xcodebuild test -project Brick.xcodeproj -scheme Brick-iOS -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6,OS=10.0'
- xcodebuild clean build -project Brick.xcodeproj -scheme Brick-Mac -sdk macosx
- xcodebuild test -project Brick.xcodeproj -scheme Brick-Mac -sdk macosx
- xcodebuild clean build -project Brick.xcodeproj -scheme "Brick-tvOS" -destination 'platform=tvOS Simulator,name=Apple TV 1080p,OS=10.0'
- xcodebuild test -project Brick.xcodeproj -scheme "Brick-tvOS" -destination 'platform=tvOS Simulator,name=Apple TV 1080p,OS=10.0'
- xcodebuild clean build -project Brick.xcodeproj -scheme Brick-iOS -sdk iphonesimulator | xcpretty
- xcodebuild test -project Brick.xcodeproj -scheme Brick-iOS -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6,OS=10.0' | xcpretty
- xcodebuild clean build -project Brick.xcodeproj -scheme Brick-Mac -sdk macosx | xcpretty
- xcodebuild test -project Brick.xcodeproj -scheme Brick-Mac -sdk macosx | xcpretty
- xcodebuild clean build -project Brick.xcodeproj -scheme "Brick-tvOS" -destination 'platform=tvOS Simulator,name=Apple TV 1080p,OS=10.0' | xcpretty
- xcodebuild test -project Brick.xcodeproj -scheme "Brick-tvOS" -destination 'platform=tvOS Simulator,name=Apple TV 1080p,OS=10.0' | xcpretty

notifications:
email: false
4 changes: 3 additions & 1 deletion Sources/Shared/Item.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ public struct Item: Mappable, Indexable {
dictionary[Key.Action.string] = action
}

dictionary[Key.Children.string] = children
if !children.isEmpty {
dictionary[Key.Children.string] = children
}

var relationItems = [String : [[String : Any]]]()

Expand Down

0 comments on commit 46ab960

Please sign in to comment.