INNER CODE UNIT · JavaScript

index

ChatFAQ/ChatFAQ · widget/store/index.js:228

            const index = state.messages.findIndex(m => m === msg)
            if (index === -1 || index === 0)
                return {}
            // return the message previously that satisfies the condition if
            if (condition) {
                for (let i = index - 1; i >= 0; i--) {
                    if (condition(state.messages[i]))
                        return state.messages[i]
                }
            } else {
                return state.messages[index - 1]
            }
        },
        customIFramedMsg: (state) => (id) => {
            if (state.customIFramedMsgs)
                return state.customIFramedMsgs[id]
        },
        getFeedbackData: (state) => async (msgSourceId) => {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…