Commit 94d6528e authored by Simon Knox's avatar Simon Knox

Merge branch 'migrate_urlparamtoobject_to_querytoobject_334522' into 'master'

Migrate the deprecated "urlParamsToObject" to "queryToObject"

See merge request gitlab-org/gitlab!65920
parents f0bdd2f3 ceeb7dc0
...@@ -2,8 +2,7 @@ import Vue from 'vue'; ...@@ -2,8 +2,7 @@ import Vue from 'vue';
import { mapActions } from 'vuex'; import { mapActions } from 'vuex';
import { parseBoolean, convertObjectPropsToCamelCase } from '~/lib/utils/common_utils'; import { parseBoolean, convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
// eslint-disable-next-line import/no-deprecated import { visitUrl, mergeUrlParams, queryToObject } from '~/lib/utils/url_utility';
import { visitUrl, mergeUrlParams, urlParamsToObject } from '~/lib/utils/url_utility';
import Translate from '~/vue_shared/translate'; import Translate from '~/vue_shared/translate';
import EpicItem from './components/epic_item.vue'; import EpicItem from './components/epic_item.vue';
...@@ -64,8 +63,9 @@ export default () => { ...@@ -64,8 +63,9 @@ export default () => {
supportedPresetTypes.indexOf(dataset.presetType) > -1 supportedPresetTypes.indexOf(dataset.presetType) > -1
? dataset.presetType ? dataset.presetType
: PRESET_TYPES.MONTHS; : PRESET_TYPES.MONTHS;
// eslint-disable-next-line import/no-deprecated const rawFilterParams = queryToObject(window.location.search, {
const rawFilterParams = urlParamsToObject(window.location.search.substring(1)); gatherArrays: true,
});
const filterParams = { const filterParams = {
...convertObjectPropsToCamelCase(rawFilterParams, { ...convertObjectPropsToCamelCase(rawFilterParams, {
dropKeys: ['scope', 'utf8', 'state', 'sort', 'layout'], // These keys are unsupported/unnecessary dropKeys: ['scope', 'utf8', 'state', 'sort', 'layout'], // These keys are unsupported/unnecessary
......
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