Skip to content

Commit

Permalink
support for Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY, Numbe…
Browse files Browse the repository at this point in the history
…r.NaN #206
  • Loading branch information
Jérôme Lebel committed Mar 5, 2015
1 parent 563aaec commit 020559a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
5 changes: 4 additions & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,21 @@ Please send me a [pull request](https://github.com/jeromelebel/MongoHub-Mac/pull
- Crash fix for [issue #200](https://github.com/jeromelebel/MongoHub-Mac/issues/200)
- Fix to create a new database with mongodb 3.0 [issue #203](https://github.com/jeromelebel/MongoHub-Mac/issues/203)
- Better json editor feedback, when saving a documetn [issue #201](https://github.com/jeromelebel/MongoHub-Mac/issues/201)
- Copying documents are now in a json array (using the pasteboard) [issue #195](https://github.com/jeromelebel/MongoHub-Mac/issues/195)
- Support for Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY, Number.NaN [issue #206](https://github.com/jeromelebel/MongoHub-Mac/issues/206)

**3.1 Beta**

- Crash fix for [issue #200](https://github.com/jeromelebel/MongoHub-Mac/issues/200)
- Fix to create a new database with mongodb 3.0 [issue #203](https://github.com/jeromelebel/MongoHub-Mac/issues/203)
- Better json editor feedback, when saving a documetn [issue #201](https://github.com/jeromelebel/MongoHub-Mac/issues/201)
- Support for Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY, Number.NaN [issue #206](https://github.com/jeromelebel/MongoHub-Mac/issues/206)

## History

**3.1 beta 3 - february 19, 2015**

- Documents are copied inside an array (using the pasteboard) [issue #195](https://github.com/jeromelebel/MongoHub-Mac/issues/195)
- Copying documents are now in a json array (using the pasteboard) [issue #195](https://github.com/jeromelebel/MongoHub-Mac/issues/195)
- Fix for a crash when the server is not valid [issue #196](https://github.com/jeromelebel/MongoHub-Mac/issues/196)
- Fix for a crash when changingn the collection name [issue #193](https://github.com/jeromelebel/MongoHub-Mac/issues/193)
- Fix for a crash when editing a document [issue #198](https://github.com/jeromelebel/MongoHub-Mac/issues/198)
Expand Down
10 changes: 9 additions & 1 deletion Sources/Helpers/MODHelper.m
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,15 @@ + (NSMutableDictionary *)convertForOutlineWithValue:(id)dataValue dataKey:(NSStr
if ([dataValue isKindOfClass:[NSNumber class]]) {
if (strcmp([dataValue objCType], @encode(double)) == 0 || strcmp([dataValue objCType], @encode(float)) == 0) {
type = @"Double";
value = [dataValue description];
if ([dataValue doubleValue] == INFINITY) {
value = @"Number.POSITIVE_INFINITY";
} else if ([dataValue doubleValue] == -INFINITY) {
value = @"Number.NEGATIVE_INFINITY";
} else if (isnan([dataValue doubleValue])) {
value = @"Number.NaN";
} else {
value = [dataValue description];
}
} else if (strcmp([dataValue objCType], @encode(int)) == 0) {
type = @"Integer";
value = [dataValue description];
Expand Down

0 comments on commit 020559a

Please sign in to comment.