-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[webview_flutter_wkwebview] Return an NSNumber that represents a bool #5968
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,6 +70,8 @@ - (void)testRemoveDataOfTypes { | |
| blockError = error; | ||
| }]; | ||
| XCTAssertEqualObjects(returnValue, @YES); | ||
| // Asserts whether the NSNumber value represents a BOOL. | ||
| XCTAssertEqual(CFBooleanGetTypeID(), CFGetTypeID((__bridge CFTypeRef)(returnValue))); | ||
|
||
| XCTAssertNil(blockError); | ||
| } | ||
| @end | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,7 +60,7 @@ - (void)createDefaultDataStoreWithIdentifier:(nonnull NSNumber *)identifier | |
| modifiedSince:[NSDate dateWithTimeIntervalSince1970: | ||
| modificationTimeInSecondsSinceEpoch.doubleValue] | ||
| completionHandler:^{ | ||
| completion(@(records.count > 0), nil); | ||
| completion([NSNumber numberWithBool:(records.count > 0)], nil); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wow, that's a surprising foot-gun. TIL. What type was it turning into exactly? Int?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yea, it was returning an int for some reason. |
||
| }]; | ||
| }]; | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.