Skip to content

Commit

Permalink
RTCDataChannel: Allow empty label (fixes cordova-rtc#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc committed Jan 28, 2016
1 parent f786e34 commit 5d4aaa3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ Methods such as `play()`, `pause()` are not implemented. In order to pause a vid

#### Version 2.2.3 (*not yet released*)

* `RTCDataChannel`: Allow empty `label` ([issue #124](https://github.com/eface2face/cordova-plugin-iosrtc/issues/124)).

* Update [yaeti](https://www.npmjs.com/package/yaeti) dependency ([issue #123](https://github.com/eface2face/cordova-plugin-iosrtc/issues/123)).

#### Version 2.2.2
Expand Down
4 changes: 2 additions & 2 deletions js/RTCDataChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ function RTCDataChannel(peerConnection, label, options, dataFromEvent) {
if (!dataFromEvent) {
debug('new() | [label:%o, options:%o]', label, options);

if (!label || typeof label !== 'string') {
throw new Error('label argument required');
if (typeof label !== 'string') {
label = '';
}

options = options || {};
Expand Down

0 comments on commit 5d4aaa3

Please sign in to comment.