mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 09:52:06 +03:00
10 lines
247 B
JavaScript
10 lines
247 B
JavaScript
|
export default function (selector) {
|
||
|
const elem = document.querySelector(selector);
|
||
|
|
||
|
if (!elem) {
|
||
|
console.warn(`{{query-selector}} could not find an element matching "${selector}"`); //eslint-disable-line
|
||
|
}
|
||
|
|
||
|
return elem;
|
||
|
}
|