chore: changed type check to use lowdefy helper function

This commit is contained in:
Machiel 2024-03-15 15:45:24 +02:00
parent 221ba93c9b
commit 44fe51493f

View File

@ -14,9 +14,11 @@
limitations under the License.
*/
import { type } from '@lowdefy/helpers';
function SetFocus({ globals, params }) {
const { document } = globals;
if (typeof params !== 'string') {
if (!type.isString(params)) {
throw new Error('SetFocus parameter must be a string.');
}
document.getElementById(params)?.focus?.();