Skip to content

Commit 2bf3cd4

Browse files
authored
Merge pull request #14 from TagCommander/v1.1.0
Fix doc, code
2 parents 6f1f6ec + a359f44 commit 2bf3cd4

3 files changed

Lines changed: 4 additions & 22 deletions

File tree

README.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -259,15 +259,6 @@ class App extends Component {
259259

260260
export default App;
261261
```
262-
263-
264-
```js
265-
// reload a container in particular
266-
wrapper.reloadContainer(ids, idc, options);
267-
// or you can reload all the containers
268-
wrapper.reloadAllContainer(options);
269-
```
270-
271262
## Sample app
272263
To help you with your implementation we provided a sample application. to run it
273264
```bash

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "react-tag-commander",
3-
"version": "1.0.2",
3+
"version": "1.1.1",
44
"main": "./src/index.js",
5-
"repository": "https://github.com/jeremielenoir/react-tag-commander.git",
5+
"repository": "https://github.com/TagCommander/react-tag-commander.git",
66
"author": "Lenoir jérémie",
77
"license": "MIT",
88
"devDependencies": {

src/index.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,8 @@ export default class TC_Wrapper {
143143
*/
144144
reloadAllContainers(options = {}) {
145145
this.logger.log('Reload all containers ', options);
146-
147-
if(!window.tC && !window.tC.container) {
148-
throw new Error('[react-tag-commander]No container to reload')
146+
if(!window.tC || !window.tC.container) {
147+
throw new Error('[react-tag-commander]No container available')
149148
}
150149

151150
window.tC.container.reload(options);
@@ -209,14 +208,6 @@ export function withTracker(WrappedComponent, options = {}) {
209208
trackPage();
210209
}
211210

212-
componentDidUpdate(prevProps) {
213-
const currentPage = prevProps.location.pathname + prevProps.location.search;
214-
const nextPage = this.props.location.pathname + this.props.location.search;
215-
if (currentPage !== nextPage) {
216-
trackPage();
217-
}
218-
}
219-
220211
render() {
221212
return React.createElement(WrappedComponent, this.props);
222213
}

0 commit comments

Comments
 (0)