Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rsuite/document-nav

Package Overview
Dependencies
Maintainers
5
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rsuite/document-nav - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

15

lib/Nav.js

@@ -90,6 +90,10 @@ 'use strict';

if (once && !this.props.content && nextProps.content || rtl !== nextProps.rtl) {
this.handelContentMount(nextProps.content);
if (rtl !== nextProps.rtl) {
this.handelContentMount(nextProps.content, nextProps.rtl);
return;
}
if (once && !this.props.content && nextProps.content) {
this.handelContentMount(nextProps.content, nextProps.rtl);
} else if (!once && this.props.content !== nextProps.content) {
this.handelContentMount(nextProps.content);
this.handelContentMount(nextProps.content, nextProps.rtl);
}

@@ -214,3 +218,3 @@ }

key: 'handelContentMount',
value: function handelContentMount(content) {
value: function handelContentMount(content, rtl) {
var titleList = [];

@@ -222,4 +226,3 @@ var anchors = [];

maxLevel = _props5.maxLevel,
fixed = _props5.fixed,
rtl = _props5.rtl;
fixed = _props5.fixed;

@@ -226,0 +229,0 @@ if (!children) {

2

package.json
{
"name": "@rsuite/document-nav",
"version": "1.0.4",
"version": "1.0.5",
"description": "Document navigation is automatically generated based on the HTML title (h1-h6) tag",

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

@@ -29,3 +29,3 @@ // @flow

showOrderNumber: boolean,
rtl:boolean
rtl: boolean
};

@@ -85,6 +85,10 @@

const { once, rtl } = this.props;
if ((once && !this.props.content && nextProps.content) || (rtl !== nextProps.rtl)) {
this.handelContentMount(nextProps.content);
if (rtl !== nextProps.rtl) {
this.handelContentMount(nextProps.content, nextProps.rtl);
return;
}
if (once && !this.props.content && nextProps.content) {
this.handelContentMount(nextProps.content, nextProps.rtl);
} else if (!once && this.props.content !== nextProps.content) {
this.handelContentMount(nextProps.content);
this.handelContentMount(nextProps.content, nextProps.rtl);
}

@@ -187,6 +191,6 @@ }

handelContentMount(content: HTMLElement) {
handelContentMount(content: HTMLElement, rtl) {
const titleList: TitleList = [];
const anchors: Array<string> = [];
const { children, minLevel, maxLevel, fixed, rtl } = this.props;
const { children, minLevel, maxLevel, fixed } = this.props;
if (!children) {

@@ -193,0 +197,0 @@ this.traverseTitle(content, titleList, anchors);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc