mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 18:31:57 +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;
|
||
|
}
|