If this happened during loading time it means that link will be added using the JavaScript and it will take some time in execution, before completing the execution of this the variable may be undefined and once it's completed we get it's value.