If I do this:
<div class="panel panel-default" v-if="socialiteLogins !== null">
The panel doesn't hide. If I check socialiteLogins === null alone, or with ==, they both return that the object isn't null. It's definitely null though. If I dump it on the page, I get [] as the result. It's an empty json object. So if I try this:
<div class="panel panel-default" v-if="socialiteLogins.length !== 0">
The panel still doesn't hide and I get this error:
Cannot read property 'length' of null
But If I do this:
<div class="panel panel-default" v-if="socialiteLogins !== null && socialiteLogins.length !== 0">
It hides the panel perfectly with no warnings on initial load but when I update the socialiteLogins variable later I get the length warning if it ever returns an empty json object again. Any idea why?
Edit:
Adding to it... if I do this:
<div class="panel panel-default" v-show="socialiteLogins">
It shows on initial load even though there are none, but if I remove them after the page loads it properly hides the panel. So the only issue appears to be the initial loading where it's not properly detecting that there are no records.