Commit 833157a3 authored by Martin Wortschack's avatar Martin Wortschack

Merge branch 'lm-replace-dirty-submit' into 'master'

Replaces underscore with lodash in javascripts/dirty_submit

See merge request gitlab-org/gitlab!28386
parents df701b16 765cca93
import _ from 'underscore';
import { memoize, throttle } from 'lodash';
import $ from 'jquery';
class DirtySubmitForm {
......@@ -21,8 +21,8 @@ class DirtySubmitForm {
}
registerListeners() {
const getThrottledHandlerForInput = _.memoize(() =>
_.throttle(event => this.updateDirtyInput(event), DirtySubmitForm.THROTTLE_DURATION),
const getThrottledHandlerForInput = memoize(() =>
throttle(event => this.updateDirtyInput(event), DirtySubmitForm.THROTTLE_DURATION),
);
const throttledUpdateDirtyInput = event => {
......
......@@ -70,6 +70,7 @@ describe('DirtySubmitForm', () => {
describe('throttling tests', () => {
beforeEach(() => {
jasmine.clock().install();
jasmine.clock().mockDate();
DirtySubmitForm.THROTTLE_DURATION = 100;
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment