mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-12-15 01:46:35 +00:00
9b1f2a4b61
Fix #2744
18 lines
388 B
Ruby
18 lines
388 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Webpacker::ManifestExtensions
|
|
def lookup(name, pack_type = {})
|
|
asset = super
|
|
|
|
if pack_type[:with_integrity] && asset.respond_to?(:dig)
|
|
[asset.dig('src'), asset.dig('integrity')]
|
|
elsif asset.respond_to?(:dig)
|
|
asset.dig('src')
|
|
else
|
|
asset
|
|
end
|
|
end
|
|
end
|
|
|
|
Webpacker::Manifest.prepend(Webpacker::ManifestExtensions)
|