Skip to content

Commit

Permalink
修复空数组时,all方法不执行的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
alan committed Nov 1, 2018
1 parent b252de0 commit e09b644
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion AYPromise.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'AYPromise'
s.version = '1.1.4'
s.version = '1.1.5'
s.summary = 'Promise for objective-c.'

s.homepage = 'https://github.com/alan-yeh/AYPromise'
Expand Down
2 changes: 1 addition & 1 deletion AYPromise/Classes/AYPromise.m
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ @implementation AYPromise (Extension)
AYPromise *AYPromiseWith(id value){
if (isBlock(value) || isInvocation(value)) {
return AYPromise.resolve(nil).then(value);
}else if (isArray(value)){
}else if (isArray(value) && [value count] > 0){
return AYPromise.all(value);
}else {
return [[AYPromise alloc] initWithValue:value];
Expand Down
2 changes: 1 addition & 1 deletion Example/AYPromise.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
92DBDC6C0A07426C2C681F2D /* Pods-AYPromise_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AYPromise_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-AYPromise_Example/Pods-AYPromise_Example.release.xcconfig"; sourceTree = "<group>"; };
AA3571645A959409DE7AEE84 /* Pods_AYPromise_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AYPromise_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
AFBF088C3C4B7C82143E70F9 /* Pods-AYPromise_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AYPromise_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-AYPromise_Example/Pods-AYPromise_Example.debug.xcconfig"; sourceTree = "<group>"; };
B76630D489B91B9181464551 /* AYPromise.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = AYPromise.podspec; path = ../AYPromise.podspec; sourceTree = "<group>"; };
B76630D489B91B9181464551 /* AYPromise.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = AYPromise.podspec; path = ../AYPromise.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
B8DA825C2BA96E8E9BFA2744 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
CFAB5D4D2D9C7911DA26774C /* Pods-AYPromise_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AYPromise_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-AYPromise_Tests/Pods-AYPromise_Tests.debug.xcconfig"; sourceTree = "<group>"; };
DEA733E1CF3B4EB9D43D8FFA /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
Expand Down

0 comments on commit e09b644

Please sign in to comment.