mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Setting start and end to definite values on undefined
This commit is contained in:
@@ -20,6 +20,8 @@ var Player = {
|
||||
Player.np.start = obj.np[0].start;
|
||||
Player.np.end = obj.np[0].end;
|
||||
Player.np.duration = obj.np[0].duration;
|
||||
if(Player.np.start == undefined) Player.np.start = 0;
|
||||
if(Player.np.end == undefined) Player.np.end = Player.np.duration;
|
||||
|
||||
if(!obj.np[0].hasOwnProperty("start")) {
|
||||
Player.np.start = 0;
|
||||
@@ -45,6 +47,8 @@ var Player = {
|
||||
Player.np.start = obj.np[0].start;
|
||||
Player.np.end = obj.np[0].end;
|
||||
Player.np.duration = obj.np[0].duration;
|
||||
if(Player.np.start == undefined) Player.np.start = 0;
|
||||
if(Player.np.end == undefined) Player.np.end = Player.np.duration;
|
||||
|
||||
if(!obj.np[0].hasOwnProperty("start")) {
|
||||
Player.np.start = 0;
|
||||
|
||||
Reference in New Issue
Block a user