mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-12-08 20:48:48 +00:00
Update list_change.js
This commit is contained in:
committed by
GitHub
parent
db89a5c55b
commit
f5a992dde0
@@ -319,8 +319,7 @@ function add_function(arr, coll, guid, offline, socket) {
|
|||||||
var socketid = socket.zoff_id;
|
var socketid = socket.zoff_id;
|
||||||
if(typeof(arr) === 'object' && arr !== undefined && arr !== null && arr !== "" && !isNaN(parseInt(arr.duration)))
|
if(typeof(arr) === 'object' && arr !== undefined && arr !== null && arr !== "" && !isNaN(parseInt(arr.duration)))
|
||||||
{
|
{
|
||||||
if(coll == "" || coll == undefined || coll == null ||
|
if(coll == "" || coll == undefined || coll == null || !arr.hasOwnProperty("duration")) {
|
||||||
!arr.hasOwnProperty("start") || !arr.hasOwnProperty("end")) {
|
|
||||||
var result = {
|
var result = {
|
||||||
start: {
|
start: {
|
||||||
expected: "number or string that can be cast to int",
|
expected: "number or string that can be cast to int",
|
||||||
@@ -336,6 +335,8 @@ function add_function(arr, coll, guid, offline, socket) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
if(arr.start == undefined) arr.start = 0;
|
||||||
|
if(arr.end == undefined) arr.end = parseInt(arr.duration);
|
||||||
var start = parseInt(arr.start);
|
var start = parseInt(arr.start);
|
||||||
var end = parseInt(arr.end);
|
var end = parseInt(arr.end);
|
||||||
if(start < 0) {
|
if(start < 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user