Compare commits

..

2 Commits

Author SHA1 Message Date
pk
9cf25a6666 Bump version 2024-07-30 11:37:46 +02:00
pk
69042b8ebe Catch empty data object in reach. 2024-07-30 11:37:11 +02:00
2 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@tp/helpers", "name": "@tp/helpers",
"version": "2.3.0", "version": "2.3.1",
"description": "", "description": "",
"main": "closest.js", "main": "closest.js",
"scripts": { "scripts": {

View File

@ -1,4 +1,6 @@
export const reach = (path, data) => { export const reach = (path, data) => {
if (!data) return;
const parts = path.split('.'); const parts = path.split('.');
let part; let part;
while (part = parts.shift()) { while (part = parts.shift()) {