twitter/bootstrap — Issue #514: Using a custom "title" attribute breaks the fallback string when the attribute is undefined
Author: opendining
Created: 2011-10-31 18:28:29+00:00
State: open

Defining a custom attribute to hold the twipsy message ("title" option) causes twipsy to display the string "undefined" when the attribute is undefined, instead of the fallback string.

The problem is at the end of getTitle. When the custom title attribute is not defined, the title variable is undefined. The title variable is cast to a string, which causes the undefined value to become the string "undefined" - which then gets displayed.

Potential fix:

https://gist.github.com/d9a988579d60224e36df