summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-core/src/shapes
diff options
context:
space:
mode:
authorSamy Pesse <samypesse@gmail.com>2016-10-02 00:15:59 +0200
committerSamy Pesse <samypesse@gmail.com>2016-10-02 00:15:59 +0200
commit24624f0d0e3f489a0430daa20a0ca59497b4e0d6 (patch)
tree30a6b8aac357d4effcdfdaa918f4ade49c964934 /packages/gitbook-core/src/shapes
parent9aaf561c4195dd363e66667b3d697694ae134337 (diff)
downloadgitbook-24624f0d0e3f489a0430daa20a0ca59497b4e0d6.zip
gitbook-24624f0d0e3f489a0430daa20a0ca59497b4e0d6.tar.gz
gitbook-24624f0d0e3f489a0430daa20a0ca59497b4e0d6.tar.bz2
Fix clear of search
Diffstat (limited to 'packages/gitbook-core/src/shapes')
-rw-r--r--packages/gitbook-core/src/shapes/Summary.js5
-rw-r--r--packages/gitbook-core/src/shapes/SummaryArticle.js7
-rw-r--r--packages/gitbook-core/src/shapes/SummaryPart.js5
3 files changed, 10 insertions, 7 deletions
diff --git a/packages/gitbook-core/src/shapes/Summary.js b/packages/gitbook-core/src/shapes/Summary.js
index 7efe4e0..f97e66c 100644
--- a/packages/gitbook-core/src/shapes/Summary.js
+++ b/packages/gitbook-core/src/shapes/Summary.js
@@ -1,6 +1,7 @@
const React = require('react');
+const { listOf } = require('react-immutable-proptypes');
+
const {
- arrayOf,
shape
} = React.PropTypes;
@@ -9,5 +10,5 @@ const Part = require('./SummaryPart');
module.exports = shape({
file: File.isRequired,
- parts: arrayOf(Part).isRequired
+ parts: listOf(Part).isRequired
});
diff --git a/packages/gitbook-core/src/shapes/SummaryArticle.js b/packages/gitbook-core/src/shapes/SummaryArticle.js
index d13bb31..c5aa717 100644
--- a/packages/gitbook-core/src/shapes/SummaryArticle.js
+++ b/packages/gitbook-core/src/shapes/SummaryArticle.js
@@ -1,8 +1,9 @@
/* eslint-disable no-use-before-define */
-const React = require('react');
+const React = require('react');
+const { list } = require('react-immutable-proptypes');
+
const {
- arrayOf,
string,
number,
shape
@@ -14,7 +15,7 @@ const Article = shape({
path: string,
ref: string,
level: string,
- articles: arrayOf(Article)
+ articles: list
});
module.exports = Article;
diff --git a/packages/gitbook-core/src/shapes/SummaryPart.js b/packages/gitbook-core/src/shapes/SummaryPart.js
index 75d5602..769ddd1 100644
--- a/packages/gitbook-core/src/shapes/SummaryPart.js
+++ b/packages/gitbook-core/src/shapes/SummaryPart.js
@@ -1,6 +1,7 @@
const React = require('react');
+const { listOf } = require('react-immutable-proptypes');
+
const {
- arrayOf,
string,
shape
} = React.PropTypes;
@@ -9,5 +10,5 @@ const Article = require('./SummaryArticle');
module.exports = shape({
title: string.isRequired,
- articles: arrayOf(Article)
+ articles: listOf(Article)
});