vyznev / soup

Stack Overflow Unofficial Patch
27 stars 6 forks source link

mse307976: TypeError: Cannot read properties of undefined (reading 'left') #55

Open InSyncWithFoo opened 1 year ago

InSyncWithFoo commented 1 year ago

mse307976 assumes that there is a $header whose .offset() returns an object with a .left property.

TypeError: Cannot read properties of undefined (reading 'left')

The page, as shown to me, has no such element (nor does it have $bar). A simple check like this should be added:

if ($header.length) {
  /* ... */
}