blob: 25f39e4fdb6383c4847bce9f51097d9609db2d77 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
/**
* Helper function that finds the href of the fiven selector and updates the location.
*
* @param {String} selector
*/
export default (selector) => {
const link = document.querySelector(selector).getAttribute('href');
if (link) {
window.location = link;
}
};
|