New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-calendar-timeline

Package Overview
Dependencies
Maintainers
5
Versions
134
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-calendar-timeline - npm Package Compare versions

Comparing version

to
0.15.4

9

CHANGELOG.md

@@ -10,3 +10,10 @@ # Change Log

## [0.15.3]
## [0.15.4]
### Fixed
- Clicking on Svg element throws error #216
## 0.15.3
This version contains one crucial bug fix and a simple update to item clicks to report time. Much of the other work was around repo maintenance and preparing the repo for future development (update to dev-tooling, some documentation updates)

@@ -13,0 +20,0 @@

8

lib/lib/utils.js

@@ -359,5 +359,7 @@ 'use strict';

function hasSomeParentTheClass(element, classname) {
if (element.className && element.className.split(' ').indexOf(classname) >= 0) return true;
return element.parentNode && hasSomeParentTheClass(element.parentNode, classname);
function hasSomeParentTheClass(element, wantedClass) {
if (element.nodeType !== 1) return false;
var actualClasses = element.getAttribute('class');
if (actualClasses && actualClasses.split(' ').indexOf(wantedClass) !== -1) return true;
return hasSomeParentTheClass(element.parentNode, wantedClass);
}

@@ -364,0 +366,0 @@

{
"name": "react-calendar-timeline",
"version": "0.15.3",
"version": "0.15.4",
"description": "react calendar timeline",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -9,3 +9,3 @@ # React Calendar Timeline

Code sandbox example: https://codesandbox.io/s/x3ql17x204
Code sandbox example: https://codesandbox.io/s/y3nwx4ron9

@@ -12,0 +12,0 @@ ## Getting started

@@ -328,5 +328,7 @@ import moment from 'moment'

export function hasSomeParentTheClass (element, classname) {
if (element.className && element.className.split(' ').indexOf(classname) >= 0) return true
return element.parentNode && hasSomeParentTheClass(element.parentNode, classname)
export function hasSomeParentTheClass (element, wantedClass) {
if (element.nodeType !== 1) return false
const actualClasses = element.getAttribute('class')
if (actualClasses && actualClasses.split(' ').indexOf(wantedClass) !== -1) return true
return hasSomeParentTheClass(element.parentNode, wantedClass)
}

@@ -333,0 +335,0 @@