From 08aec0691f3567d9da1011ef5ed63580ce4b9b4f Mon Sep 17 00:00:00 2001 From: BigTeri Date: Mon, 19 Dec 2016 04:25:09 +0100 Subject: [PATCH] fix cli error --- dist/cli.js | 2 +- package.json | 2 +- src/cli.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/cli.js b/dist/cli.js index 834cfdc..5f1df8c 100644 --- a/dist/cli.js +++ b/dist/cli.js @@ -51,7 +51,7 @@ new _server2.default({ stationOptions: { storageType: _commander2.default.storageType, ffmpegPath: _commander2.default.ffmpegPath, - playlists: [_commander2.default.youtubeItems.map(item => mapYouTubeList(item))] + playlists: [(_commander2.default.youtubeItems || []).map(item => mapYouTubeList(item))] } }).on("error", err => { console.error(err); diff --git a/package.json b/package.json index 98a6846..3d66856 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jscast", - "version": "0.3.0", + "version": "0.3.1", "description": "A SHOUTcast Server/Library written in JavaScript", "author": "BigTeri", "license": "MIT", diff --git a/src/cli.js b/src/cli.js index e2189a7..3e9b63d 100644 --- a/src/cli.js +++ b/src/cli.js @@ -43,7 +43,7 @@ new Server({ storageType: program.storageType, ffmpegPath: program.ffmpegPath, playlists: [ - program.youtubeItems.map((item) => mapYouTubeList(item)) + (program.youtubeItems || []).map((item) => mapYouTubeList(item)) ] } })