Please write that as `if (typeof lockPointer === 'undefined') lockPointer = true;`