image-size.js (less.js-4.1.2) | : | image-size.js (less.js-4.1.3) | ||
---|---|---|---|---|
skipping to change at line 14 | skipping to change at line 14 | |||
export default environment => { | export default environment => { | |||
function imageSize(functionContext, filePathNode) { | function imageSize(functionContext, filePathNode) { | |||
let filePath = filePathNode.value; | let filePath = filePathNode.value; | |||
const currentFileInfo = functionContext.currentFileInfo; | const currentFileInfo = functionContext.currentFileInfo; | |||
const currentDirectory = currentFileInfo.rewriteUrls ? | const currentDirectory = currentFileInfo.rewriteUrls ? | |||
currentFileInfo.currentDirectory : currentFileInfo.entryPath; | currentFileInfo.currentDirectory : currentFileInfo.entryPath; | |||
const fragmentStart = filePath.indexOf('#'); | const fragmentStart = filePath.indexOf('#'); | |||
let fragment = ''; | ||||
if (fragmentStart !== -1) { | if (fragmentStart !== -1) { | |||
fragment = filePath.slice(fragmentStart); | ||||
filePath = filePath.slice(0, fragmentStart); | filePath = filePath.slice(0, fragmentStart); | |||
} | } | |||
const fileManager = environment.getFileManager(filePath, currentDirector y, functionContext.context, environment, true); | const fileManager = environment.getFileManager(filePath, currentDirector y, functionContext.context, environment, true); | |||
if (!fileManager) { | if (!fileManager) { | |||
throw { | throw { | |||
type: 'File', | type: 'File', | |||
message: `Can not set up FileManager for ${filePathNode}` | message: `Can not set up FileManager for ${filePathNode}` | |||
}; | }; | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 0 lines changed or added |