mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[FIX] runbot: export diff_match_patch properly
The lib exports its data through the global object, an odoo module then re-exports the module to make it available to other odoo modules.
This commit is contained in:
parent
7e5d21b9a0
commit
8c17b91452
@ -64,6 +64,7 @@
|
||||
'assets': {
|
||||
'web.assets_backend': [
|
||||
'runbot/static/libs/diff_match_patch/diff_match_patch.js',
|
||||
'runbot/static/src/diff_match_patch_module.js',
|
||||
'runbot/static/src/fields/*',
|
||||
],
|
||||
},
|
||||
|
@ -2235,7 +2235,7 @@ var diff_match_patch = function() {
|
||||
// /** @suppress {globalThis} */
|
||||
// this['DIFF_EQUAL'] = DIFF_EQUAL;
|
||||
|
||||
export {
|
||||
(typeof window !== "undefined" ? window : this).DiffMatchPatch = {
|
||||
diff_match_patch,
|
||||
DIFF_DELETE,
|
||||
DIFF_INSERT,
|
||||
|
5
runbot/static/src/diff_match_patch_module.js
Normal file
5
runbot/static/src/diff_match_patch_module.js
Normal file
@ -0,0 +1,5 @@
|
||||
odoo.define("@runbot/diff_match_patch", [], function () {
|
||||
'use strict';
|
||||
|
||||
return DiffMatchPatch;
|
||||
});
|
@ -1,7 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
import { Message } from "@mail/core/common/message";
|
||||
import { diff_match_patch } from "@runbot/libs/diff_match_patch/diff_match_patch";
|
||||
import { diff_match_patch } from "@runbot/diff_match_patch";
|
||||
|
||||
patch(Message.prototype, {
|
||||
setup() {
|
||||
|
Loading…
Reference in New Issue
Block a user