mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +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': {
|
'assets': {
|
||||||
'web.assets_backend': [
|
'web.assets_backend': [
|
||||||
'runbot/static/libs/diff_match_patch/diff_match_patch.js',
|
'runbot/static/libs/diff_match_patch/diff_match_patch.js',
|
||||||
|
'runbot/static/src/diff_match_patch_module.js',
|
||||||
'runbot/static/src/fields/*',
|
'runbot/static/src/fields/*',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -2235,7 +2235,7 @@ var diff_match_patch = function() {
|
|||||||
// /** @suppress {globalThis} */
|
// /** @suppress {globalThis} */
|
||||||
// this['DIFF_EQUAL'] = DIFF_EQUAL;
|
// this['DIFF_EQUAL'] = DIFF_EQUAL;
|
||||||
|
|
||||||
export {
|
(typeof window !== "undefined" ? window : this).DiffMatchPatch = {
|
||||||
diff_match_patch,
|
diff_match_patch,
|
||||||
DIFF_DELETE,
|
DIFF_DELETE,
|
||||||
DIFF_INSERT,
|
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 **/
|
/** @odoo-module **/
|
||||||
import { patch } from "@web/core/utils/patch";
|
import { patch } from "@web/core/utils/patch";
|
||||||
import { Message } from "@mail/core/common/message";
|
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, {
|
patch(Message.prototype, {
|
||||||
setup() {
|
setup() {
|
||||||
|
Loading…
Reference in New Issue
Block a user