mirror of
https://github.com/php-flasher/php-flasher.git
synced 2026-03-31 15:07:47 +01:00
fix: Ensure global timeout setting applies to all requests
This commit is contained in:
@@ -7,7 +7,7 @@ import { AbstractPlugin } from './plugin'
|
||||
export default class FlasherPlugin extends AbstractPlugin {
|
||||
private theme: Theme
|
||||
private options = {
|
||||
timeout: 5000,
|
||||
timeout: null,
|
||||
timeouts: {
|
||||
success: 5000,
|
||||
info: 5000,
|
||||
@@ -31,7 +31,7 @@ export default class FlasherPlugin extends AbstractPlugin {
|
||||
const render = () =>
|
||||
envelopes.forEach((envelope) => {
|
||||
// @ts-expect-error
|
||||
const typeTimeout = this.options.timeouts[envelope.type] ?? this.options.timeout
|
||||
const typeTimeout = this.options.timeout ?? this.options.timeouts[envelope.type] ?? 5000;
|
||||
const options = {
|
||||
...this.options,
|
||||
...envelope.options,
|
||||
|
||||
Reference in New Issue
Block a user