Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

11802 convert faq block titles to headings #12023

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix small cs
  • Loading branch information
Dieterrr committed Jan 14, 2019
commit e4711de11c97f733a135f467c814b038e6fb909a
5 changes: 2 additions & 3 deletions js/src/structured-data-blocks/faq/components/FAQ.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ export default class FAQ extends Component {
*/
changeQuestion( newQuestion, newAnswer, previousQuestion, previousAnswer, index ) {
const questions = this.props.attributes.questions ? this.props.attributes.questions.slice() : [];

if ( index >= questions.length ) {
return;
}
Expand Down Expand Up @@ -128,7 +127,7 @@ export default class FAQ extends Component {
* @param {number} [index] The index of the Question after which a new Question should be added.
* @param {array|string} [question] The question of the new Question.
* @param {array|string} [answer] The answer of the new Question.
* @param {bool} [focus=true] Whether or not to focus the new Question.
* @param {boolean} [focus=true] Whether or not to focus the new Question.
*
* @returns {void}
*/
Expand All @@ -142,7 +141,7 @@ export default class FAQ extends Component {
let lastIndex = questions.length - 1;
while ( lastIndex > index ) {
this.editorRefs[ `${ lastIndex + 1 }:question` ] = this.editorRefs[ `${ lastIndex }:question` ];
this.editorRefs[ `${ lastIndex + 1}:answer` ] = this.editorRefs[ `${ lastIndex }:answer` ];
this.editorRefs[ `${ lastIndex + 1 }:answer` ] = this.editorRefs[ `${ lastIndex }:answer` ];
lastIndex--;
}

Expand Down