~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/app/javascript/anim/anim.js

Use Y.Lang.isObject() instead of implied truthiness.

Show diffs side-by-side

added added

removed removed

Lines of Context:
100
100
        var to = ncfg.to;
101
101
        // Check the background color to make sure
102
102
        // it isn't 'transparent'.
103
 
        if (to && Y.Lang.isFunction(to.backgroundColor)) {
 
103
        if (Y.Lang.isObject(to) && Y.Lang.isFunction(to.backgroundColor)) {
104
104
            var bg = to.backgroundColor.call(anim, anim.get('node'));
105
105
            if (bg === 'transparent') {
106
106
                Y.error("Can not animate to a 'transparent' background " +