Skip to content

Commit f9c664b

Browse files
committed
fix: don't crash when js integration is used.
1 parent 6cbb589 commit f9c664b

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Once the user gets in a queue, he's shown a different activity `QueueActivity` ,
3131
```
3232

3333
## Usage
34-
34+
To use this library, you first have to make sure your integration method is **KnownUser**.
3535
To protect parts of your application you'll need to make a `QueueIt.run` call and await it's result.
3636
Once the async call completes, the user has gone through the queue and you get a **QueueITToken** for this session.
3737

example/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class App extends Component<{}, AppState> {
2929
};
3030
}
3131
componentDidMount() {
32-
//QueueIt.enableTesting(true);
32+
//QueueIt.enableTesting();
3333
}
3434

3535
enqueue = async () => {

ios/QueueIt.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,11 @@ - (dispatch_queue_t)methodQueue
7575
}
7676

7777
- (void)notifyYourTurn:(QueuePassedInfo *)queuePassedInfo {
78-
self.resolve(@{@"queueittoken": queuePassedInfo.queueitToken, @"state": ENQUEUE_STATE(Passed)});
78+
NSString *queueItToken = queuePassedInfo.queueitToken;
79+
if(queueItToken==nil){
80+
queueItToken = @"";
81+
}
82+
self.resolve(@{@"queueittoken": queueItToken, @"state": ENQUEUE_STATE(Passed)});
7983
}
8084

8185
- (void)notifyQueueViewWillOpen {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-queue-it",
3-
"version": "0.1.16",
3+
"version": "0.1.17",
44
"description": "React Native Module for integrating Queue-it's virtual waiting room into React Native apps.",
55
"main": "lib/commonjs/index",
66
"module": "lib/module/index",

0 commit comments

Comments
 (0)