Skip to content

Commit

Permalink
Fixed obvious logic error.
Browse files Browse the repository at this point in the history
Assign current_version with terser syntax.
  • Loading branch information
Ashton-W committed Aug 14, 2013
1 parent 8c77d9a commit b724b23
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/xcodeproj/project/object/group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,10 @@ def new_xcdatamodeld(path, sub_group_path = nil)
child_ref.source_tree = '<group>'
last_child_ref = child_ref
elsif File.basename(child_path) == '.xccurrentversion'
xccurrentversion = Xcodeproj.read_plist(child_path)
xccurrentversion = Xcodeproj.read_plist(child_path)['_XCCurrentVersionName']
end
end
ref.current_version = last_child_ref unless xccurrentversion?
ref.current_version = xccurrentversion['_XCCurrentVersionName'] if xccurrentversion?
ref.current_version = xccurrentversion || last_child_ref
end

parent_group = find_subpath(sub_group_path, true)
Expand Down

0 comments on commit b724b23

Please sign in to comment.