Files
ai-course/node_modules/core-js-pure/modules/es.array.with.js
KQL ce6aa207e9 fix: 修复图片路径以适配GitHub Pages base path
- 将所有图片路径从绝对路径改为使用 process.env.PUBLIC_URL
- 修复 HomePage.tsx 中所有图片引用
- 修复 CoursePage.tsx 中所有图片引用
- 确保图片在 GitHub Pages 上正确加载

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-04 09:24:45 +08:00

25 lines
770 B
JavaScript

'use strict';
var $ = require('../internals/export');
var arrayWith = require('../internals/array-with');
var toIndexedObject = require('../internals/to-indexed-object');
var $Array = Array;
// Firefox bug
var INCORRECT_EXCEPTION_ON_COERCION_FAIL = (function () {
try {
// eslint-disable-next-line es/no-array-prototype-with, no-throw-literal -- needed for testing
[]['with']({ valueOf: function () { throw 4; } }, null);
} catch (error) {
return error !== 4;
}
})();
// `Array.prototype.with` method
// https://tc39.es/ecma262/#sec-array.prototype.with
$({ target: 'Array', proto: true, forced: INCORRECT_EXCEPTION_ON_COERCION_FAIL }, {
'with': function (index, value) {
return arrayWith(toIndexedObject(this), $Array, index, value);
}
});