7650677d3d
This MR rewrites existing Related Merge Requests widget with Vue with reusing shared Related Issues components
15 lines
371 B
JavaScript
15 lines
371 B
JavaScript
import sanitize from 'sanitize-html';
|
|
|
|
export const parseIssuableData = () => {
|
|
try {
|
|
const initialDataEl = document.getElementById('js-issuable-app-initial-data');
|
|
|
|
return JSON.parse(sanitize(initialDataEl.textContent).replace(/"/g, '"'));
|
|
} catch (e) {
|
|
console.error(e); // eslint-disable-line no-console
|
|
|
|
return {};
|
|
}
|
|
};
|
|
|
|
export default {};
|