<commit_before>import { h, Component } 				from 'preact/preact';
import NavSpinner						from 'com/nav-spinner/spinner';

import ContentPost						from 'com/content-post/post';
import ContentUser						from 'com/content-user/user';

import $Node							from '../../shrub/js/node/node';

export default class ContentTimeline extends Component {
	constructor( props ) {
		super(props);
		
		this.state = {
			id: 0,
			feed: null
		};
		
		this.componentWillReceiveProps( props );
		
		
		this.makeItem = this.makeItem.bind(this);
	}
	
	componentWillReceiveProps( props ) {
		if ( props.node.id === this.state.id )
			return;
		
		// Clear the Feed
		this.setState({ id: props.node.id, feed: [] });
		
		$Node.GetFeed( props.node.id, "post" )
		.then(r => {
			if ( r.feed && Object.keys(r.feed).length ) {
				$Node.Get( Object.keys(r.feed) )
				.then(rr => {
					// Hack: Posts should go in Publish Date order
					rr.node.reverse();
					this.setState({ feed: rr.node });
				})
				.catch(err => {
					this.setState({ error: err });
				});
			}
			else {
				this.setState({ error: "Not found" });
			}			
		})
		.catch(err => {
			this.setState({ error: err });
		})
	}
<commit_msg>should fix 'no posts' bug #310<commit_after>import { h, Component } 				from 'preact/preact';
import NavSpinner						from 'com/nav-spinner/spinner';

import ContentPost						from 'com/content-post/post';
import ContentUser						from 'com/content-user/user';

import $Node							from '../../shrub/js/node/node';

export default class ContentTimeline extends Component {
	constructor( props ) {
		super(props);
		
		this.state = {
			id: 0,
			feed: null
		};
		
		this.componentWillReceiveProps( props );
		
		
		this.makeItem = this.makeItem.bind(this);
	}
	
	componentWillReceiveProps( props ) {
		if ( props.node.id === this.state.id )
			return;
		
		// Clear the Feed
		this.setState({ 'id': props.node.id, 'feed': null });
		
		$Node.GetFeed( props.node.id, "post" )
		.then(r => {
			if ( r.feed && Object.keys(r.feed).length ) {
				$Node.Get( Object.keys(r.feed) )
				.then(rr => {
					// Hack: Posts should go in Publish Date order
					rr.node.reverse();
					this.setState({ 'feed': rr.node });
				})
				.catch(err => {
					this.setState({ 'error': err });
				});
			}
			else {
				this.setState({ 'feed': [] });
			}			
		})
		.catch(err => {
			this.setState({ 'error': err });
		})
	}

{'fraction_non_alphanumeric': 0.16938519447929737, 'fraction_numerical': 0.002091175240485153, 'mean_word_length': 2.512481644640235, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4024543', 'n_tokens_mistral': 1038, 'n_tokens_neox': 831, 'n_words': 178}