我正面临一个问题,其中url片段在Safari中的重定向时没有被保留,因为它们应该根据http规范.
设定 -
`/url1` redirects to `/url2#hash`
`/url2` redirects to `/url3`
Run Code Online (Sandbox Code Playgroud)
预期的行为 -
Hitting `/url1` should redirect to `/url3#hash`
Run Code Online (Sandbox Code Playgroud)
观察到的行为 -
Chrome/FF - Hitting `/url1` redirects to `/url3#hash`
Safari(11+) - Hitting `/url1` redirects to `/url3`
Run Code Online (Sandbox Code Playgroud)
我确实阅读过早期版本Safari报告的问题.我也尝试过在其他SO线程中发布的解决方案是徒劳的.
任何帮助表示赞赏.
For the following code:
const x = {
a: 'c',
b: 'd'
};
const y = {
[x.a]: 'e',
}
Run Code Online (Sandbox Code Playgroud)
the generated types are:
typeof x -> {
a: string,
b: string
}
typeof y -> {
[x: string]: string
}
Run Code Online (Sandbox Code Playgroud)
Expected type:
typeof y -> {
c: string
}
Run Code Online (Sandbox Code Playgroud)
Similar issue on SO has a solution which is not relevant here