This commit is contained in:
Sam Potts 2018-09-25 23:29:43 +10:00
parent d9565e9250
commit 87072cb690
3 changed files with 3 additions and 5 deletions

View File

@ -6,7 +6,7 @@ import controls from './controls';
import ui from './ui'; import ui from './ui';
import { repaint } from './utils/animation'; import { repaint } from './utils/animation';
import browser from './utils/browser'; import browser from './utils/browser';
import { getElement, getElements, hasClass, matches, toggleClass, toggleHidden } from './utils/elements'; import { getElement, getElements, matches, toggleClass, toggleHidden } from './utils/elements';
import { on, once, toggleListener, triggerEvent } from './utils/events'; import { on, once, toggleListener, triggerEvent } from './utils/events';
import is from './utils/is'; import is from './utils/is';

View File

@ -15,9 +15,7 @@ export const transitionEndEvent = (() => {
transition: 'transitionend', transition: 'transitionend',
}; };
const type = Object.keys(events).find( const type = Object.keys(events).find(event => element.style[event] !== undefined);
event => element.style[event] !== undefined,
);
return is.string(type) ? events[type] : false; return is.string(type) ? events[type] : false;
})(); })();

View File

@ -24,7 +24,7 @@ export function getPercentage(current, max) {
return 0; return 0;
} }
return (current / max * 100).toFixed(2); return ((current / max) * 100).toFixed(2);
} }
// Replace all occurances of a string in a string // Replace all occurances of a string in a string